Progress
Version 9
Product Update Bulletin
READPAST Record Lock
The
READPAST
locking hint skips locked rows during the execution of aSELECT
statement. This option causes a transaction to skip rows locked by other transactions that would ordinarily appear in the result set, rather than block the transaction waiting for the other transactions to release their locks on those rows. TheREADPAST
lock hint applies only to transactions operating atREAD
COMMITTED
isolation level and will read only past row-level locks. This only applies to theSELECT
statement.The locking hint clause such as for
READPAST
can only be specified in the mainSELECT
statement, but not in the sub-querySELECT
statement in the search condition of theWHERE
clause.The
SELECT
statement uses the following syntax:Syntax
The
WITH
phrase uses the following syntax:
EXAMPLES
NOWAIT
— causes theSELECT
statement to skip (read past) the row immediately if a lock cannot be acquired on a row in the selection set because of the lock held by some other transaction. The default behavior is for the transaction to wait until it gets the required lock or until it times out waiting for the lock.WAIT
timeout — overrides the default lock-wait time-out. The time-out value is in seconds and can be given a 0 or any positive number.The following example illustrates the use of the
READPAST
locking hint withNOWAIT
specified:
The following example illustrates the use of the
READPAST
locking hint withWAIT
time-out specified:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |