← Azure SQL administration: migration and operations
04 / 8 · 45 MIN

Query Store and concurrency

Investigate regressions and blocking using history and transaction context.

Concept and mechanism

Query Store retains query, plan, and execution information supporting before-and-after change comparisons. Use windows with comparable volume and concurrency. Estimated plan cost is not duration in milliseconds. Also inspect collection health: desired_state READ_WRITE can coexist with actual_state READ_ONLY when a limit or another condition prevents new observations. Check readonly_reason and consumption before changing retention or capacity. Do not erase all history precisely when it is needed to explain regression. Automatic tuning can correct plans and verify effects; available options differ between SQL Database and Managed Instance. A previously successful plan still needs observation as data and workloads change.

Guided application

In a fictional close, many sessions wait behind a long transaction. Identify the head blocker, owner, and code before terminating sessions. Rollback and retries can extend impact. A deadlock differs from ordinary waiting: circular dependency exists and the engine chooses a victim, commonly reported as error 1205. Inspect the graph and resource-access order, keeping transactions short and consistent where appropriate. Retry can form part of the response but must account for an aborted transaction, committed state, and external effects. Incident reporting should distinguish observed cause, applied mitigation, recovery time, and recurrence-prevention work. Preserve enough evidence to let the next support shift reproduce the reasoning.

IN PRACTICE

desired_state=READ_WRITE, actual_state=READ_ONLY: confirm the actual cause before trusting the absence of new samples.

Common pitfalls

No samples as healthy; forced plan as permanently optimal; blocking as deadlock; kill without rollback assessment.

Related topics: Platform, capacity, and migration · Identity, networking, and encryption · Sensitive data and evidence

Take this idea with you

Telemetry health forms part of diagnosis.

Create account

Reference: Query Store history and plans · DP-300 English objectives effective 2026-04-24