db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dag.Wan...@Sun.COM (Dag H. Wanvik)
Subject Re: Second thread is blocked until the first thread commit the transaction, I can not understand why...
Date Mon, 03 Aug 2009 15:44:50 GMT
"sarah.kho" <sarah.kho@gmail.com> writes:

> Hi 
> I am learning transaction and isolation levels. I tried to use
> read_committed in one thread and then in another thread insert some data
> into a table. the reader thread is blocked and waits until the first thread
> commit the transaction to complete the select statement. What I can not
> understand is: shouldn't the second thread only read what is already
> committed instead of waiting until the inserting thread finishes its job? 

In addition to Brett's fine summary, this ref may be of interest:

Some databases uses MVCC:


which help increase read/writer concurrency.

Derby uses row and table level locking for concurrency control.


View raw message