Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: deadlocks between single update statements ?
<hasta_l3_at_hotmail.com> wrote in message
news:1159000862.384129.73710_at_i3g2000cwc.googlegroups.com...
> Dear group,
>
> Assume a transaction A with a single update statement updating many
> rows of a table.
> Assume another transaction B also with a single update, concurrently
> updating the same rows, but perhaps in a different order.
>
> Can these single updates deadlock ?
>
If the row updates are in exactly the same order, the second transaction will wait for the first transaction to commit or rollback. If the row updates are in a different order you will get a deadlock.
> How do you prevent this ?
>
> Thanks much.
>
-- Regards Jonathan Lewis http://www.oracle.com/technology/community/oracle_ace/ace1.html#lewis The Co-operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.html Cost Based Oracle: Fundamentals http://www.jlcomp.demon.co.uk/cbo_book/ind_book.htmlReceived on Sat Sep 23 2006 - 04:23:45 CDT