SQL Server
SQL Server Is Slow: The First 15 Minutes of Incident Triage
A production-first triage sequence for turning a vague SQL Server slowdown into evidence and a safe next diagnostic step in the first 10–15 minutes.
On this page
Short answer: in the first 15 minutes, answer two questions before changing anything. Is the problem server-wide or limited to one workload, database or query? And which signal dominates: CPU, I/O, blocking, memory pressure, or one expensive query? Capture volatile evidence while you answer them, then hand off to the right deeper investigation. This guide covers only that triage, not tuning.
The safest workflow moves from scope to evidence and only then to change. Capture volatile evidence before killing a session, restarting a service, clearing the plan cache, or rebuilding an index. Those actions can remove the symptoms and the evidence while leaving the cause untouched.
- SQL Server is slowRecord the symptom, workload and time window
- Server-wide or one workload?All applications, one database, or one operation
- high CPUCPUTop CPU requests, compilations, parallelism
- I/O waitsI/OReads per query first, then storage latency
- lock waitsBlockingHead blocker, then the SQL Server Blocking Runbook
- memoryOther waitsMemory grants, RESOURCE_SEMAPHORE, network
- one statementExpensive queryPlan, reads, row estimates
- plan changedPlan regressionCompare time windows in Query Store
Problem: define what “slow” means
Start with the affected workload and clock time. Ask whether all applications are slow or only one operation; whether failures are continuous or intermittent; and whether the problem is happening now. Record the database, expected and observed duration, application, login, host, and an example request identifier if the application exposes one.
“Reports from ReportingDb started taking 90 seconds instead of 8 seconds at 14:10” is actionable. It suggests a database and time window and can be compared with Query Store, monitoring, deployments, and scheduled jobs. “CPU is high” is not equivalent to “CPU is the cause.” Useful work, a scan caused by a poor estimate, and spin caused by repeated compilations can all consume CPU for different reasons.
Quick diagnostic: current or historical?
If the slowdown is happening now, inspect active requests and blocking first. Dynamic management views are a live snapshot: run the query more than once and save the output with a timestamp. If the slowdown ended, use Query Store, monitoring history, Extended Events, application telemetry, and job history. The plan cache may help, but it is not a durable audit log and can lose entries through eviction, recompilation, restart, failover, or cache-clearing operations.
Before changing anything, capture:
- the report time and server time, including time zone;
- active session and request identifiers;
- database, login, host, application and SQL text;
- status, wait type, blocking session, CPU, reads, writes and elapsed time;
- the relevant execution plan or Query Store query and plan identifiers;
- recent deployments, configuration changes, maintenance and unusual workload volume.
Query: capture active requests
Run this from a login with VIEW SERVER STATE on versions where that permission is required. On newer versions, the permission may be VIEW SERVER PERFORMANCE STATE. The query is read-only and excludes its own session.
SELECT
SYSDATETIMEOFFSET() AS captured_at,
r.session_id,
r.request_id,
DB_NAME(r.database_id) AS database_name,
s.login_name,
s.host_name,
s.program_name,
r.status,
r.command,
r.wait_type,
r.wait_time AS wait_time_ms,
NULLIF(r.blocking_session_id, 0) AS blocking_session_id,
r.cpu_time AS cpu_time_ms,
r.logical_reads,
r.reads AS physical_reads,
r.writes,
r.total_elapsed_time AS elapsed_time_ms,
SUBSTRING(
text_info.text,
(r.statement_start_offset / 2) + 1,
((CASE r.statement_end_offset
WHEN -1 THEN DATALENGTH(text_info.text)
ELSE r.statement_end_offset
END - r.statement_start_offset) / 2) + 1
) AS current_statement
FROM sys.dm_exec_requests AS r
INNER JOIN sys.dm_exec_sessions AS s
ON s.session_id = r.session_id
OUTER APPLY sys.dm_exec_sql_text(r.sql_handle) AS text_info
WHERE s.is_user_process = 1
AND r.session_id <> @@SPID
ORDER BY r.total_elapsed_time DESC;Notes
- line 13NULLIF turns 0 (not blocked) into NULL, so only real blockers show a value.
- lines 19–26Extracts the statement executing now from the batch: the offsets are bytes into Unicode text, and -1 means the end of the batch.
- line 30OUTER APPLY keeps requests that have no SQL handle; CROSS APPLY would drop them.
How to read the result
First look for concentration. One request with high elapsed time and modest CPU may be waiting; many requests with the same blocker may form a blocking chain; many expensive requests from one program_name may point to an application spike. wait_type explains what a request is currently waiting for, not the root cause. A lock wait directs you toward the blocker. PAGEIOLATCH_* indicates a wait for a data page from storage, but the next question is why that page was needed. ASYNC_NETWORK_IO can mean the client is consuming rows slowly, or simply that the query returns too many rows.
Compare elapsed time with CPU. Large elapsed time with small CPU often indicates waiting. High CPU and logical reads together commonly justify plan inspection. Writes may be data changes, worktable activity, or maintenance. Always interpret counters in the workload context; an overnight ETL request is not comparable to a single-row API lookup.
What the result may mean
A blocking session ID leads to the blocking workflow: locate the head blocker, inspect its transaction and SQL, and determine why it remains open. Repeated scans and high logical reads lead to the plan, estimates, indexes, statistics, predicates, and table size. A plan that recently changed leads to Query Store and a comparison of time windows. Load concentrated by login, host, or program leads to the calling application, connection pooling, concurrency, retry behavior, or a scheduled batch.
If the active snapshot looks normal, do not conclude that nothing happened. The expensive request may have completed between samples. Switch to historical evidence and verify that Query Store capture is enabled and healthy. Compare the incident window to a known-good window rather than comparing unrelated hours with different workloads.
What to check next
Inspect the execution plan only after identifying the statement. Compare estimated and actual rows when an actual plan can be collected safely. Check whether statistics represent current data distribution and whether an existing index supports the predicates. A missing-index suggestion is one input, not permission to create an index. Check overlap, width, write cost, and the actual plan.
Then check change history: code and schema deployments, compatibility level, database-scoped configuration, parameter patterns, data growth, statistics maintenance, infrastructure, failover, and scheduled jobs. A recent change is a hypothesis to test, not proof.
What not to do
- Restart SQL Server before capturing evidence: it clears the DMVs, the plan cache and the waits you needed.
- Clear the plan cache server-wide to fix one query: every query recompiles and the evidence disappears.
- Rebuild every index “just in case”: it costs I/O and log, and rarely fixes the query that is slow now.
- Kill sessions before identifying the head blocker, or kill the blocked session instead of the blocker.
- Make several changes at once: you lose the ability to tell which one helped.
- Use
NOLOCKas a blocking fix and accept inconsistent results. - Blame CPU because it is visible while ignoring the query doing the work.
Production notes
DMVs are shared production structures, so keep diagnostic queries focused and avoid polling at an aggressive interval. Save results outside the affected instance when practical. Permissions differ by SQL Server version and hosting model. Query Store adds durable query and plan history, but its capture mode, size limit, cleanup state, and read/write status must be checked before relying on it.
Measure the same workload after a change: duration, CPU, logical reads, writes, execution count, waits, and error rate. If the evidence does not improve, revert when safe and revisit the hypothesis. The goal is not merely to make the alert disappear; it is to understand which condition changed and demonstrate that the system behaves better.
After triage
Once the first 15 minutes have narrowed the symptom, continue with the full SQL Server performance tuning workflow. Use running queries and blocking for live evidence, or Query Store regressions when the slowdown has already passed. The Performance Troubleshooting Flow quick reference summarizes the same decisions, and the SQL Server Blocking Runbook is the procedure for an active blocking incident.
Sources
- Microsoft Learn: sys.dm_exec_requests (including permissions), sys.dm_os_wait_stats, Monitor performance by using the Query Store, Execution plans
- Microsoft troubleshooting guides: Understand and resolve blocking, Troubleshoot high CPU usage, Troubleshoot slow performance caused by I/O issues
Checked against Microsoft Learn in November 2026. On SQL Server 2022 and later, the DMV permission is VIEW SERVER PERFORMANCE STATE.
Was this helpful?
What could be better?
Thanks — that helps me improve Javi Builds.
Continue learning
- Cheat sheetFind High CPU QueriesIdentify SQL Server queries consuming the most CPU now and historically, distinguish total CPU from CPU per execution, and choose the right next tuning step.Open cheat sheet
- RoadmapSQL Server Troubleshooting & DiagnosticsA production-first triage sequence for turning a vague SQL Server slowdown into evidence and a safe next diagnostic step in the first 10–15 minutes.View roadmap
What should I build next?
I'm building Javi Builds around practical problems data engineers actually face. Tell me what you'd like to see next.
Stay in the loop
Get the Javi Builds updates you actually care about.
Check your inbox
I sent you a confirmation link. Your subscription will be active after you confirm it.