LCK_M_RS_S

transaction is waiting to acquire a key-range lock on an index. This lock has two components:   

  • A lock in shared mode on the range between two consecutive index entries or rows. The locked range can't be modified but can be read by other transactions.

  • A lock in shared mode on the index entries or rows. The locked rows can't be modified but can be read by other transactions.

Key-range locks protect the rows included in a record set, and prevent phantom reads, insertions and deletions when the T-SQL is using serializable transaction level.

Investigating

  • Check the affected queries and the Top queries table. Tune queries so they run faster and require fewer locks. See: Query tuning (TechNet).

  • On the Analysis page, check these metrics for additional details on locking behavior:

    • Lock timeouts/sec

    • Lock timeouts/sec

    • Avg. lock wait time

  • On the Analysis page, check these metrics to see whether memory problems or I/O bottlenecks are causing locks to be held for longer than usual:

    • Machine: memory used

    • Memory pages/sec

    • Disk avg. read time

    • Disk avg. write time

    • Buffer cache hit ratio

    • Buffer page life expectancy

See also: Investigating I/O bottlenecks.


 


Didn't find what you were looking for?