Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle db 11g - For update skip locked with ROWNUM syntax

Priya Ranjan SahayJan 16 2015 — edited Jan 20 2015

Hi,

I am facing a problem as stated in the Subject.

I have a query like:

SELECT coln  FROM tab1

WHERE col1 = 'xxx'

and ROWNUM =1

    FOR UPDATE SKIP LOCKED;

The coln data needs to be extracted into a PL/SQL variable & thereafter the record needs to be deleted from the table, tab1

There are great no of candidate records in the table but still have issues:

1) it takes considerable time &

2) until the current transaction is committed, another run of the same query returns no record

My Create table script has set PCTFREE, INITRANS to 0 & 16 respectively. Is it a concern?

Kindly help to understand the issues.

Regards,

Priya Ranjan Sahay

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 17 2015
Added on Jan 16 2015
6 comments
707 views