Category: Wait Types
-
PRINT_ROLLBACK_PROGRESS Wait Type in SQL Server
PRINT_ROLLBACK_PROGRESS is recorded by a session that has issued ALTER DATABASE … WITH ROLLBACK IMMEDIATE (or ROLLBACK AFTER n) and is now waiting for the user transactions it killed to finish rolling back. The thread sleeps in three-second loops, checking progress, until every victim has undone its work and the database can transition state. The…
Written by
-
PVS_PREALLOCATE Wait Type in SQL Server
PVS_PREALLOCATE is recorded by the background task that preallocates space in the Persistent Version Store (PVS) for databases with Accelerated Database Recovery (ADR) enabled. The task adapts to demand: on a quiet database it wakes every five minutes (accruing five-minute waits); under heavy versioning activity it runs far more often with much shorter waits, throttling…
Written by
-
PWAIT_DIRECTLOGCONSUMER_GETNEXT Wait Type in SQL Server
PWAIT_DIRECTLOGCONSUMER_GETNEXT is recorded when a thread reading from the transaction log waits for a log block to be supplied to it. The direct log consumer interface serves the components that stream the log as it is produced, Availability Group capture being the flagship, and a consumer that has caught up to log generation waits here…
Written by
-
PWAIT_HADR_WORKITEM_COMPLETED Wait Type in SQL Server
PWAIT_HADR_WORKITEM_COMPLETED is recorded by a thread waiting for an asynchronous Availability Group work task to complete. AG management operations frequently hand their real work to async tasks, adding a database to an AG, removing one, joining a replica, and the initiating thread parks in this wait until the work item reports back. Expected during any…
Written by
-
QDS_ASYNC_QUEUE Wait Type in SQL Server
QDS_ASYNC_QUEUE is recorded when a thread waits for access to the queue of Query Store information that is being asynchronously persisted to disk. Query Store collects runtime stats in memory and stages them through this queue for background writing; the wait is the coordination around that staging. Third member of the Query Store background trio,…
Written by
-
QDS_CLEANUP_STALE_QUERIES_TASK_MAIN_LOOP_SLEEP Wait Type in SQL Server
The longest wait name most DBAs will ever paste into a search engine is also one of the least interesting: QDS_CLEANUP_STALE_QUERIES_TASK_MAIN_LOOP_SLEEP is recorded by the Query Store cleanup task while it sleeps between runs that remove old query information from the store. Size-based and time-based cleanup both ride this schedule. A timer between housekeeping sweeps,…
Written by
-
QDS_DYN_VECTOR Wait Type in SQL Server
QDS_DYN_VECTOR is recorded when a thread waits for access to one of Query Store’s thread-safe internal data structures (a dynamic vector, per the name). Query Store’s in-memory machinery is shared across every session whose queries it tracks, so brief synchronisation on its structures is routine. Marked “internal use only” by the documentation, and it behaves…
Written by
-
QDS_LOADDB Wait Type in SQL Server
QDS_LOADDB is recorded while Query Store loads its data for a database during that database’s startup, after instance restarts, failovers, crash recovery, or the database coming back online. Here is the part that bites: by default (before SQL Server 2019), that load is synchronous, and queries cannot run against the database until it finishes. The…
Written by
-
QDS_PERSIST_TASK_MAIN_LOOP_SLEEP Wait Type in SQL Server
QDS_PERSIST_TASK_MAIN_LOOP_SLEEP is recorded by the Query Store background persistence task while it sleeps between rounds of flushing captured query metrics from memory to disk. Query Store collects runtime stats in memory and writes them out on an interval (the DATA_FLUSH_INTERVAL_SECONDS setting, 15 minutes by default); this wait is the timer between those flushes. A background…
Written by
-
QDS_STMT Wait Type in SQL Server
QDS_STMT is recorded when a thread waits for access to Query Store’s map of query hashes, the structure that tracks which queries have been seen. Registering a previously-untracked query requires latching that map exclusively to add the new hash, so every genuinely new query text pays a brief serialisation. For workloads that parameterise well, new…
Written by
Blog Categories
- Backups & Recovery (6)
- High Availability (HA) (6)
- Installation & Configuration (12)
- Labs (1)
- Maintenance (2)
- Monitoring (20)
- Performance Tuning (8)
- Security (Encryption & Permissions) (5)
- T-SQL Fundamentals (8)
- Troubleshooting (6)
- Wait Types (201)
Latest Posts
- 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
- PREEMPTIVE_COM Wait Types 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)