Readpast lockhint guarantees to give only committed records
but will automatically skip records that are being
inserted or updated.
This way we can avoid any possible locking while select and also make sure that dirty reads are not happening.
For eg,
I have 2 parallel Tx , in one tx i'm updating the row 5 and row 7 and in second tx i'm doing the select from row 1 to row 10.
Without readpast , select query will be locked untill update is over, but with readpast, it will give me 8 rows skipping 2 rows being updated.
SQLServer and Sybase has this facility in which lock is obtained while read as well.
Is there anything similar we can use for DB2, because I have seen in DB2 as well in such scenarios locking will happen.
Quote:
Originally posted by sathyaram_s
Sorry ... I have no idea what READPAST mean ...
Can you explain please
Sathyaram
|