Category: Wait Types
-
LAZYWRITER_SLEEP Wait Type in SQL Server
LAZYWRITER_SLEEP is recorded by the lazy writer thread while it sleeps between checks of the buffer pool free list. Roughly once a second it wakes, checks whether memory pressure requires freeing buffers, does whatever little work exists, and goes back to sleep. Each sleeping second lands in this wait, per lazy writer thread (large NUMA…
Written by
-
KSOURCE_WAKEUP Wait Type in SQL Server
KSOURCE_WAKEUP is recorded by SQL Server’s background control task while it waits to be told, by the Windows Service Control Manager, to shut the instance down. One thread (typically SPID 7 or thereabouts) holds this wait for the entire life of the instance. Its accounting quirk: sys.dm_os_wait_stats shows it with near-zero time because the wait…
Written by
-
IO_QUEUE_LIMIT Wait Type in SQL Server
IO_QUEUE_LIMIT is a wait recorded when a session cannot issue another asynchronous I/O because its queue of outstanding async I/Os is already at its limit. The engine caps how much async I/O a single task can have in flight; when the cap is hit, the task waits here until some of the in-flight I/O completes.…
Written by
-
IMPPROV_IOWAIT Wait Type in SQL Server
IMPPROV_IOWAIT is recorded when a thread has issued an asynchronous read against a bulk load source file and is waiting for the read to complete. It belongs to BULK INSERT, OPENROWSET(BULK…), BCP, and similar import paths: the engine reads the source data file, and time spent waiting on those reads lands here. It is effectively…
Written by
-
HTREPARTITION Wait Type in SQL Server
HTREPARTITION completes the batch-mode hash table wait family. When a parallel batch-mode hash join or aggregation discovers its shared hash table will not fit as built, it repartitions the table’s input to process it in smaller pieces, and every thread must synchronise around that repartitioning. This wait is the queue at that synchronisation point. As…
Written by
-
HTREINIT Wait Type in SQL Server
HTREINIT is part of the batch-mode hash table wait family. Parallel batch-mode hash joins and aggregations share one hash table across threads (since SQL Server 2014), and some join strategies process their input in multiple passes or partial joins. HTREINIT is the threads synchronising before the shared hash table is reset for the next partial…
Written by
-
HTMEMO Wait Type in SQL Server
HTMEMO belongs to the batch-mode hash table wait family (HTBUILD, HTDELETE, HTREINIT, HTREPARTITION). Since SQL Server 2014, parallel batch-mode hash joins and aggregations use one shared hash table across all threads; HTMEMO is the synchronisation before threads scan that shared table to output matches and non-matches, the pattern used by outer joins and some aggregations.…
Written by
-
HTDELETE Wait Type in SQL Server
HTDELETE is the best known of the batch-mode hash table waits. Since SQL Server 2014, parallel batch-mode hash joins and aggregations share a single hash table across threads (2012 built one per thread), trading memory savings for synchronisation. HTDELETE is threads waiting on that synchronisation at the end of the hash join or aggregation, when…
Written by
-
HTBUILD Wait Type in SQL Server
HTBUILD is one of the batch-mode hash table waits (with HTDELETE, HTMEMO, HTREINIT, and HTREPARTITION). From SQL Server 2014 onward, parallel batch-mode hash joins and aggregations share one hash table between all threads instead of building one per thread, which saves a lot of memory but means the threads must synchronise. HTBUILD specifically is threads…
Written by
-
HP_SPOOL_BARRIER Wait Type in SQL Server
HP_SPOOL_BARRIER is a curiosity: a wait type introduced across various versions as part of a bug fix for parallel spool behaviour, then removed again in the very next cumulative update for each of those versions because the fix itself was flawed. Paul White documented the underlying bug and its circumstances in detail. It exists in…
Written by
Blog Categories
- Backups & Recovery (6)
- High Availability (HA) (6)
- Installation & Configuration (12)
- Labs (1)
- Maintenance (3)
- Monitoring (20)
- Performance Tuning (8)
- Security (Encryption & Permissions) (5)
- T-SQL Fundamentals (8)
- Troubleshooting (6)
- Wait Types (201)
Latest Posts
- When Shrinking Temp DB Just Won’t Shrink
- SQL Server Replication Monitoring Scripts
- SQL Server Wait Types Library
- PARALLEL_REDO_WORKER_SYNC Wait Type in SQL Server
- PARALLEL_REDO_WORKER_WAIT_WORK Wait Type in SQL Server
- PERFORMANCE_COUNTERS_RWLOCK Wait Type in SQL Server
Blog Tags
Always On Availability Groups (4) Certificates & Encryption (1) Database Backups & Recovery (10) Database Maintenance (6) DBA Tools (29) Performance Troubleshooting (9) PowerShell (4) Query Behaviour (4) Schema Changes (1) SQL Agent (1) SQL Interview Questions (1) SQL Scripts (23) SQL Server Administration (11) SQL Server Configuration (7) SQL Server Errors (5) SQL Server High Availability (4) SQL Server Internals (4) SQL Server Management Studio (SSMS) (7) SQL Server Monitoring (10) SQL Server Networking (9) SQL Server Replication (2) SQL Server Security (8) SQL Server Versions (2) Storage and Capacity (14) T-SQL (9) Transaction Logs (8) Troubleshooting (14) Windows Server (4)