Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Effective deadlock handling
Saeed wrote:
> In message <K54Kb.735379$HS4.5605072_at_attbi_s01>, VC > <boston103_at_hotmail.com> writes >
> > I understand the above, but the point I was trying to a was that if both > sessions do the following at the same time: > > Session 1: SELECT * from t1 where x = 1 or x = 2 for update > Session 2: SELECT * from t1 where x = 1 or x = 2 for update > > then, to my mind deadlock should not occur since one of these will get > to the first row first, blocking the other, and then succeeding in the > next row too. > > That is what I find puzzling. > > Kind regards, > > Saeed > > sr_ng 786
The records stay in the "deadlocked" state until the transaction is completed by either a commit or rollback. So the problem is also mostly solvable by performing incremental commits.
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Mon Jan 05 2004 - 10:20:19 CST
![]() |
![]() |