Using readpast

Considerations for using readpast.

  • readpast allows delete commands on data-only-locked tables to proceed without being blocked by incompatible locks held by other tasks.
    • On datarows-locked tables, readpast skips all rows on which shared, update, or exclusive locks are held by another task.

    • On datapages-locked tables, readpast skips all pages on which shared, update, or exclusive locks are held by another task.

  • Commands specifying readpast block if there is an exclusive table lock.

  • If the readpast option is specified for an allpages-locked table, it is ignored. The command blocks as soon as it finds an incompatible lock.

  • If the session-wide isolation level is 3, the readpast option is silently ignored. The command executes at level 3. The command blocks on any rows or pages with incompatible locks.

  • If the transaction isolation level for a session is 0, a delete command using readpast does not issue warning messages. For datapages-locked tables, delete with readpast modifies all rows on all pages that are not locked with incompatible locks. For datarows-locked tables, it affects all rows that are not locked with incompatible locks.

  • If the delete command applies to a row with two or more text columns, and any text column has an incompatible lock on it, readpast locking skips the row.