Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> UPDATE statements and locks

UPDATE statements and locks

From: Paul <f1fteen_at_hotmail.com>
Date: 13 Feb 2003 09:08:00 -0800
Message-ID: <7b7286ec.0302130908.620398ec@posting.google.com>


Hi all,

Can someone tell me exactly how locking is implemented in Oracle when an UPDATE statement is executed.

eg. UPDATE table

    SET fields
    WHERE condition;

The way I understand it is that only the rows that satisfy the WHERE clause are locked.

So, if the WHERE clause takes a long time to evaluate ie. a complex join of the form _WHERE EXISTS(SELECT ...)_, how does it know in advance which rows to lock. Or does it lock the whole table until the "update set" is realised?

Thanks in advance for any help.

Paul. Received on Thu Feb 13 2003 - 11:08:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US