(Republishing, or using this info in a commercial product/website, is prohibited without permission. All other uses are permitted. If in doubt, please ask.)
This wait type occurs when a thread is waiting for access to a non-page data structure so that it can read the data structure. The thread cannot get access to the data structure because another thread has it latched in exclusive mode. For a full description of non-page latches and investigating them, see the LATCH_EX wait type.
(Books Online description: “Occurs when waiting for a SH (share) latch. This does not include buffer latches or transaction mark latches. A listing of LATCH_* waits is available in sys.dm_os_latch_stats. Note that sys.dm_os_latch_stats groups LATCH_NL, LATCH_SH, LATCH_UP, LATCH_EX, and LATCH_DT waits together.”)
Questions/comments on this wait type? Click here to send Paul an email, especially if you have any information to add to this topic.
Added in SQL Server version:
Removed in SQL Server version:
Extended Events wait_type value:
The map_key value in sys.dm_xe_map_values is 34 in all versions through 2014 RTM. After 2014 RTM, you must check the DMV to get the latest value as some map_key values have changed in later builds.
For a full description of non-page latches and investigating them, see the LATCH_EX wait type.
Known occurrences in SQL Server (list number matches call stack list):
- Waiting for the FGCB_ADD_REMOVE latch to determine which filegroup file to allocate from (in this case, while copying a LOB value)
- Waiting for the TRACE_CONTROLLER latch to read the list of active Profiler traces (in this case, while periodically flushing them)
And many, many more stacks around the set of non-page latches.
Abbreviated call stacks (list number matches known occurrences list):