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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Cheap table lock?

Re: Cheap table lock?

From: Mark J. Bobak <mark_at_bobak.net>
Date: Sat, 28 Sep 2002 00:18:18 -0800
Message-ID: <F001.004DBDF7.20020928001818@fatcity.com>


Um, no. Select for update will lock whatever rows it selects. If it happens to select all the rows in a table, then all the rows in the table will be locked. But, you could select for update where primary_key=1 and select (and lock) just one row. As with other DML locks, the lock will be released when you commit or rollback.

See the concepts manual for more details.

Hope that helps,

-Mark

On Fri, 2002-09-27 at 20:33, tony ynot wrote:
> Is Select ... For Update;
> a cheap table lock?
> It seems whenever code uses this statement
> all the records in the cursor are locked
> until the cursor is closed.
>
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com

-- 
--
Mark J. Bobak
Oracle DBA
mark_at_bobak.net
"It is not enough to have a good mind.  The main thing is to use it
well."
 						-- Rene Descartes
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mark J. Bobak
  INET: mark_at_bobak.net

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Sat Sep 28 2002 - 03:18:18 CDT

Original text of this message

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