compare_query_plans
Compare two query plans to reveal differences in operators, duration, CPU, and I/O. When plan IDs are omitted, automatically contrasts the best and worst performing plans.
Instructions
Compare two query plans side-by-side: operators, duration, CPU, I/O. If plan IDs not specified, compares best vs worst plan by duration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query_id | Yes | Query Store query_id. | |
| plan_id_a | No | First plan_id to compare (optional, uses best by default). | |
| plan_id_b | No | Second plan_id to compare (optional, uses worst by default). | |
| database_name | No | Optional database name. Defaults to AZURE_SQL_DEFAULT_DATABASE. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||