Get Wait Statistics
mssql_wait_statsAnalyze SQL Server wait statistics to find top wait types, average waits, and CPU signal percentages, revealing CPU, I/O, lock, or memory bottlenecks since restart or in a live sample.
Instructions
Wait statistics: the top wait types (what the server waits on: CPU, I/O, locks, memory), each as % of all waits, with average wait and signal (CPU) %. Idle waits are excluded. sampleSeconds=0 (default): since the last restart. sampleSeconds=5: only waits during a 5-second sample, the "what is slow right now" view.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topN | No | Number of wait types to return (1–100). | |
| minWaitMs | No | Minimum wait time in milliseconds for a wait type to be included. | |
| sampleSeconds | No | Live sampling window in seconds. 0 = cumulative since restart. >0 = blocks for this many seconds and reports only waits accrued during the interval; use 5 for a live "right now" snapshot (matches sp_BlitzFirst). Must be below REQUEST_TIMEOUT (default 30s) or the call times out. |