read-execution-plan
Installation
SKILL.md
Read an Azure SQL Database execution plan
Gets the plan that explains a query, in the smallest form that carries the signal, and tells
estimated numbers from measured ones. Measured 2026-08-29 against a live engine
reporting EngineEdition 5 and Edition SQL Azure; claims one session cannot measure are
attributed to Microsoft Learn inline.
Estimated is not actual, and the sources disagree about which you get
| Source | Returns | Runs the query? |
|---|---|---|
SET SHOWPLAN_XML ON |
Estimated plan only | No |
SET STATISTICS XML ON |
Actual plan, ActualRows on every operator |
Yes, for real |
sys.dm_exec_query_plan |
Estimated plan only, even after the query has run | No |
sys.dm_exec_query_plan_stats |
Last execution's actual plan | No, but off by default |
sys.dm_exec_query_statistics_xml |
Actual plan of a query running right now | No |
sys.query_store_plan plus sys.query_store_runtime_stats |
Actual plan and aggregated stats, persisted | No |