Re: Table Lock on Select for Update?

From: Madhavi Lokam <gmadhavi_at_pms991.pms.ford.com>
Date: 1995/05/10
Message-ID: <3oqjuj$jk2_at_eccdb1.pms.ford.com>#1/1


In article <17399783FS86.BJSIEBEN_at_bcsc02.gov.bc.ca>, BJSIEBEN_at_bcsc02.gov.bc.ca writes:
|> If anyone can confirm what I've heard about Select for Update. What I
|> heard was: when the select for update is issued, Oracle locks the row(s)
|> in the select, but when the actual update occuer (ie. update....) Oracle
|> will lock the entire table while the actual update is happening.
|>
|> Has anyone else heard this? I find it hard to believe the entire table
|> is locked for the brief time the actual update occurs. We are using
|> Oracle7 on AIX.
|>
|> .....Barry Sieben

Yes , This is true if you are not using LOCK TABLE before update.

Without LOCK TABLE , an insert, update or delete commands lock the whole table till the operation is complete.

If you want to give restricted access to other users when the update/delete/insert is in progress, use the LOCK TABLE COMMAND with appropriate Lock Mode before that other DML command is issued.

Madhavi Lokam
Consultant
FORD MOTOR COMPANY Received on Wed May 10 1995 - 00:00:00 CEST

Original text of this message