Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: can table locking improve performance ??

RE: can table locking improve performance ??

From: Mercadante, Thomas F <>
Date: Tue, 8 Jun 2004 14:48:38 -0400
Message-ID: <DE8A21F8F1D0254EA4A9214D52AB2FEDAD5C0C@exchsen0a1ma>


My guess is that you will ether see no improvment at all, or it will get worse.  

Oracle will issue it's own locks - your placing a lock on a row may actually slow it down. I can't see it getting any better. As you said, you will be the only person on the database at the time - you will be contending with anyone else trying to lock either the table or a row in the table.  

I say leave it alone. Don't issue any locks at all - let Oracle take care of them.  

To speed up the process, you may need to re-engineer how you are doing it. Are you performing a straight sqlldr load, CTAS, procedural loop/insert/update?  

Tom Mercadante
Oracle Certified Professional

-----Original Message-----

From: [] Sent: Tuesday, June 08, 2004 2:42 PM
Subject: can table locking improve performance ??

We have an initial load process that is very long running. The update of 38M rows takes hours and hours. There are two users on the entire system, us doing the load and another user to look at some of the v$ views during the load process.

Updates need to put exclusive row-level locks before being able to update rows. If we do a table level lock PRIOR to the update statement, what effect will it have on performance. Intuitively, we think it should be more efficient, but I don't know if Oracle will be more efficient in checking locks when updating rows or does the exact same source code apply, regardless if there is a table level lock.

In other words, in this case, can a table level lock improve performance ?

Please see the official ORACLE-L FAQ:

To unsubscribe send email to: put 'unsubscribe' in the subject line.
Archives are at
FAQ is at

Received on Tue Jun 08 2004 - 13:46:24 CDT

Original text of this message