Skip to content

Latest commit

 

History

History
42 lines (34 loc) · 2.15 KB

sql-server-latches-object.md

File metadata and controls

42 lines (34 loc) · 2.15 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
SQL Server, Latches object
Learn about the SQLServer:Latches object, which provides counters to monitor internal SQL Server resource locks called latches.
MikeRayMSFT
mikeray
12/04/2023
sql
performance
reference
Latches object
SQLServer:Latches

SQL Server, Latches object

[!INCLUDE SQL Server]

The SQLServer:Latches object in Microsoft [!INCLUDE ssNoVersion] provides counters to monitor internal [!INCLUDE ssNoVersion] resource locks called latches. Monitoring the latches to determine user activity and resource usage can help you to identify performance bottlenecks.

This table describes the [!INCLUDE ssNoVersion] Latches counters.

SQL Server Latches counters Description
Average Latch Wait Time (ms) Average latch wait time (in milliseconds) for latch requests that had to wait.
Average Latch Wait Time Base For internal use only.
Latch Waits/sec Number of latch requests that could not be granted immediately.
Number of SuperLatches Number of latches that are currently SuperLatches.
SuperLatch Demotions/sec Number of SuperLatches that have been demoted to regular latches in the last second.
SuperLatch Promotions/sec Number of latches that have been promoted to SuperLatches in the last second.
Total Latch Wait Time (ms) Total latch wait time (in milliseconds) for latch requests in the last second.

Example

You begin to explore the query performance counters in this object using this T-SQL query on the sys.dm_os_performance_counters dynamic management view:

SELECT * FROM sys.dm_os_performance_counters
WHERE object_name LIKE '%Latches%';

Related content