db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendleton.de...@gmail.com>
Subject Re: insert, select --> deadlock (2 threads, 1 table)
Date Sat, 26 Jun 2010 20:25:19 GMT
> Now, I have remarked that creating an index on column 'SOMEDATA'
> is sufficient to remove the deadlock.

I think an alternate approach would be to commit the insert, then
perform the select in a separate transaction.

And yet a third way, I believe, would be to set your transaction
isolation to a lower level than SERIALIZABLE.

But creating an index on the other column seems best, if you are
routinely using it in the WHERE clause.



View raw message