"sarah.kho" <[email protected]> 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:

http://en.wikipedia.org/wiki/Multiversion_concurrency_control

which help increase read/writer concurrency.

Derby uses row and table level locking for concurrency control.

Dag

Reply via email to