Get Execution Plan
mssql_execution_planRetrieve the cached execution plan (showplan XML) for a SQL Server query using its plan handle without running the query. Get the handle from mssql_top_queries first.
Instructions
Execution plan (showplan XML) of a cached query, by plan handle. Reads the plan cache only; never runs the query. Get the Plan Handle from mssql_top_queries. Large plans are cut at 35,000 characters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| queryPlanHandle | Yes | Hex plan handle from sys.dm_exec_query_stats (e.g. 0x060006...). |