optimize_indexes
Analyze workload from Query Store to generate and rank index candidates, balancing read benefit, size, and write overhead for budget-constrained recommendations.
Instructions
Run the index optimization engine: analyzes workload from Query Store, generates index candidates from execution plans and DMVs, estimates sizes, scores using Pareto optimization (read benefit vs size vs write overhead), and returns budget-constrained ranked recommendations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| beta | No | Write penalty weight (higher = avoid indexes on write-heavy tables). | |
| alpha | No | Size penalty weight (higher = prefer smaller indexes). | |
| top_n | No | Number of top queries to analyze. | |
| budget_mb | No | Max total index size in MB. None = unlimited. | |
| database_name | No | Optional database name. Defaults to AZURE_SQL_DEFAULT_DATABASE. | |
| window_minutes | No | Query Store lookback window in minutes. | |
| min_improvement_pct | No | Minimum impact percentage to include a candidate. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||