How to get the specific queries that are contributing to high lock wait times?



  • I am looking at SQL lock wait time perf mon counter and it is indicating high value ranging from 5 to 20 seconds during certain times of the day.

    I have setup extended events which gives me the T-SQL statements that are executing. Is there any way to get the list of:

    1. Specific queries that are contributing to high locking time?

    2. Specific queries that are actually blocking other queries?



  • You can see these articles. It describes the locking process in the SQL server:

    https://solutioncenter.apexsql.com/techniques-to-identify-blocking-queries-and-other-causes-of-sql-server-blocks/

    https://docs.microsoft.com/en-us/sql/relational-databases/extended-events/determine-which-queries-are-holding-locks?view=sql-server-ver15

    https://docs.microsoft.com/en-us/troubleshoot/sql/performance/understand-resolve-blocking




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2