Network Management

LCK_M_X SQL WAIT Stats

This content will describe SQL Server wait type that can be encountered more or less commonly, which includes the description, steps that should be taken, and additional resources that could be used for troubleshooting.

First published date

10/8/2021 12:57 PM

Last published date

10/8/2021 12:57 PM

Overview

This Occurs when a resource is in use by another query, usually, the result of an UPDATE, INSERT, or DELETE statement. LCK waits are usually caused by resource contention but may also be the results of process blocking from any of the above wait types

Product section

Network Performance Monitor

Cause

Description

This wait occurs while a request is waiting to acquire an exclusive lock. It typically accumulates while requests are being blocked by a write transaction (implicit or explicit). When transactions are kept open for extended periods of time it can cause long delays for other requests

Resolution

Suggested solutions
  1. Keep transaction durations short.
  2. Investigate enabling the READ_COMMITTED_SNAPSHOT database setting
  3. Run trace/Profiler/Extended Event session in conjunction with Blocked Process Threshold to determine which queries are being blocked
  4. Indexing, ensure that long running queries and transactions are optimized
  5. Ensure that row, page and table locks are being escalated correctly. If the table is partitioned consider enabling partition escalation

The content posted herein are provided as a suggestion or recommendation to you for your internal use. The information set forth herein may come from third party website or customers. SolarWinds is not liable for any downtime or any issue that may occur if you perform the following suggestions on the link provided. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment.