Published 31 January 2017
An operation is waiting for an update latch on an in-memory page. Update latches are commonly used when there’s row versioning activity in tempdb, or when system allocation pages are being updated. Unlike exclusive latches, they do not update the page data itself. The update latch remains in place until pages are successfully written to disk. It can’t be held concurrently with existing destroy or exclusive latches.
PAGELATCH_* latches are lightweight, non-configurable internal locks used by SQL Server’s storage engine to protect concurrent access to in-memory pages. For example, when the storage engine wants to access a data page in the buffer pool to send to the relational engine, it must first request a latch on that page. The latch is released once the operation has finished, and the duration is usually dependent on available memory.
If your system is experiencing latch waits, it may suggest there’s high contention for in-memory pages of tables or indexes. Latch contention is typically associated with tempdb pages, particularly Global Allocation Map (GAM), Shared Global Allocation Map (SGAM) and Page Free Space (PFS) pages. See Under the covers: GAM, SGAM, and PFS pages (MSDN).
- Check the DMV sys.dm_os_waiting_tasks to see if there’s a problem with a specific page. See Page Latch Contention.
- Find out if you’re suffering from contention with TempDB. See Breaking Down TempDB Contention.
- Check whether concurrent inserts into the same index range are causing the problem. See Diagnosing and Resolving Latch Contention on SQL Server (Microsoft Download Center).