[Info-ingres] concepts

Ingres Forums info-ingres at kettleriverconsulting.com
Sun Mar 8 15:52:18 UTC 2015


Generally yes, rows are locked as reading progresses.  That may mean
different things for say hash vs btree, and things get more complicated
if secondary indexes are in the mix.

Yes, it's possible for two transactions to proceed at different speeds. 
The T1/T2 scenario you pose will have T1 waiting until T2 commits.  You
generally won't see a deadlock from single queries, although it's
possible (especially if secondary indexing is involved, and the two
queries use different indexes).  If T1 selects everything first, that
simply means that T2 will wait instead.

An update statement may proceed row by row, or it might select what it
needs first and then update everything.  It depends on a lot of things: 
the query plan chosen, whether there are update rules on the table, etc.
Yes, isolation level affects anything that selects, including updates
and deletes.


-- 
kschendel
------------------------------------------------------------------------
kschendel's Profile: http://community.actian.com/forum/member.php?userid=29
View this thread: http://community.actian.com/forum/showthread.php?t=16909




More information about the Info-ingres mailing list