read-execution-plan
Retrieves an Azure SQL Database execution plan, estimated or actual, and pulls out the small set of facts that explain slowness: operators, estimated versus actual row counts, warnings, missing-index hints, and the memory grant, instead of returning the whole plan XML. Use when someone says "read this execution plan", "why did the optimizer choose a scan here", "show me the actual plan not the estimated one", or hands over a plan and asks what is wrong with it. Also covers retrieval itself: SET SHOWPLAN_XML, SET STATISTICS XML, the plan-handle views, and Query Store, and the several ways a same-looking call returns the wrong kind of plan, a stub, or NULL without raising an error. Not general slow-query triage (diagnose-slow-query), lock analysis (diagnose-blocking-and-deadlocks), or instance-level CPU or memory pressure (diagnose-resource-pressure).
Pinned to revision eeb1c6867c2d, so it is the text this page describes rather than whatever the author pushed since.
Files
- skills/read-execution-plan/SKILL.md
- skills/read-execution-plan/references/dmv-and-xquery-reference.md
Every link opens the file at its source, pinned to the revision this page describes.