Category: Wait Types

  • ONDEMAND_TASK_QUEUE Wait Type in SQL Server

    ONDEMAND_TASK_QUEUE is recorded by a background task while it waits for high-priority system task requests to arrive, DTC commit and abort processing being the documented example. The engine keeps this lane clear for work that cannot queue behind ordinary tasks, and the lane being empty is its normal state. Books Online says it directly: long…

  • OLEDB Wait Type in SQL Server

    OLEDB indicates SQL Server is waiting for an OLE DB provider call to return. This usually means linked server access and distributed queries, but the same interface is used internally, so the wait has a famous false positive built in. The false positive first: DBCC CHECKDB and its siblings generate OLEDB waits, because the DBCC…

  • MSQL_XP Wait Type in SQL Server

    MSQL_XP is recorded while a task waits for an extended stored procedure (XP) to finish. Extended stored procedures are external code, DLLs loaded into the SQL Server process, called through the old XP interface: xp_cmdshell, xp_fixeddrives, third-party backup and monitoring XPs, and vendor add-ons. The wait lasts exactly as long as the external code runs,…

  • MSQL_DQ Wait Type in SQL Server

    MSQL_DQ is recorded while a task waits for a distributed query operation to finish, a query spanning a linked server or another OLE DB data source. The wait runs for the duration of the remote call, and the engine also uses it to detect potential MARS application deadlocks in distributed scenarios. Together with OLEDB, it…

  • METADATA_LAZYCACHE_RWLOCK Wait Type in SQL Server

    METADATA_LAZYCACHE_RWLOCK is a wait on the reader-writer lock protecting lazily-populated metadata caches, internal caches of object metadata that fill on first use rather than up front. Threads reading a cache while another thread populates or invalidates it queue on this lock. Version note: this name belongs to older versions; SQL Server 2012 replaced it with…

  • MEMORY_ALLOCATION_EXT Wait Type in SQL Server

    MEMORY_ALLOCATION_EXT is recorded when a thread switches to preemptive mode while allocating memory from the OS or from SQL Server’s internal allocators. The switch exists so the allocation code does not have to keep checking whether the thread’s scheduling quantum has run out; the thread steps outside cooperative scheduling, allocates, and steps back in. Memory…

  • LOGPOOL Wait Types in SQL Server

    The LOGPOOL_* waits all belong to one structure, so this page covers the family: LOGPOOL_CACHESIZE, LOGPOOL_CONSUMER, LOGPOOL_CONSUMERSET, LOGPOOL_FREEPOOLS, and LOGPOOL_REPLACEMENTSET. The log pool is an in-memory cache of recently flushed log blocks. Its purpose: log readers, the components that consume the transaction log after it is written, can read recent log from memory instead of…

  • LOGMGR_RESERVE_APPEND Wait Type in SQL Server

    LOGMGR_RESERVE_APPEND is a wait recorded when a thread needs to write a log record but there is no free space left in the transaction log. The thread first tries to grow the log file; if it cannot, and the database is in simple recovery (or behaving like it), it waits one second at a time…

  • LOGMGR_QUEUE Wait Type in SQL Server

    LOGMGR_QUEUE is recorded by the log writer thread (threads, plural, from SQL Server 2016 onward) while waiting for something to do: either new log to flush or an in-flight write to complete. The log writer is a permanent background resident, and whenever your workload is not committing transactions, it parks here. It is one of…

  • LOGMGR Wait Type in SQL Server

    LOGMGR is a wait that occurs when a database is being closed and a thread has to wait for all outstanding transaction log I/O to complete before the log can be shut down. Databases close during instance shutdown, when a database is taken offline or detached, and when the AUTO_CLOSE option closes an idle database.…