Re: Which query is best?

From: Wolfgang Breitling <>
Date: Tue, 15 Dec 2009 07:51:26 -0700
Message-Id: <>

Which of the tables is being updated?
Maybe the query should include the "OF <column name>" clause:

"OF ... column

Use the OF ... column clause to lock the select rows only for a particular table or view in a join. The columns in the OF clause only indicate which table or view rows are locked. The specific columns that you specify are not significant. However, you must specify an actual column name, not a column alias. If you omit this clause, then the database locks the selected rows from all the tables in the query." [ emphasis mine ]

At 01:26 AM 12/15/2009, Syed Jaffar Hussain wrote:
>Almost all sessions runs this query frequently followed by an update
>statement. During a dead lock situation, I found most of the session
>waiting on 'enq: TX - row lock contention' wait event. I would say
>table2 is a core table in this application.


Wolfgang Breitling
Centrex Consulting Corporation

Received on Tue Dec 15 2009 - 08:51:26 CST

Original text of this message