← ClaudeAtlas

sqlindex-advisorlisted

Analyze SQL Server execution plans to produce a ranked CREATE INDEX script. Applies 10 checks (D1–D10). Derives index recommendations from operator patterns (Key Lookups, scans, sorts, spools, nested loops, filtered index opportunities, hash match probe-side scans — D1–D10) and the optimizer's explicit MissingIndexGroup suggestions. Also accepts sys.dm_db_missing_index_details + sys.dm_db_missing_index_group_stats DMV output directly, without a plan file. Use this skill whenever a user wants index recommendations from an execution plan; asks what indexes would help a query; mentions Key Lookup, index scan, missing index, filtered index, or covering index; or asks to generate CREATE INDEX statements. Trigger after sqlplan-review findings or directly on any .sqlplan file or missing index DMV output.
vanterx/mssql-performance-skills · ★ 1 · API & Backend · score 77
Install: claude install-skill vanterx/mssql-performance-skills
# SQL Server Index Advisor Skill ## Purpose Produce a prioritized, ready-to-run `CREATE INDEX` script from three independent sources: 1. **Operator-derived recommendations** — index opportunities inferred directly from plan operator patterns (Key Lookups, expensive scans, Sort operators, Eager Index Spools, high-count Nested Loops, residual predicates, heap scans, backward scans, filtered index candidates, hash match probe-side scans) 2. **Optimizer suggestions** — the explicit `<MissingIndexGroup>` elements SQL Server emits, consolidated and de-duplicated 3. **DMV data** — `sys.dm_db_missing_index_details` + `sys.dm_db_missing_index_group_stats` output, which provides server-wide frequency data (`UserSeeks × AvgQueryCost`) unavailable in plan files All sources feed into a single unified merge and ranking pipeline. The final output contains one CREATE INDEX statement per table group — not one per source. ## Input Accept any of: - One or more `.sqlplan` file paths - Raw `.sqlplan` XML pasted inline - A description of plan operators if XML is not available - Output from `sys.dm_db_missing_index_details` + `sys.dm_db_missing_index_group_stats` (Source C — no plan file required): ```sql -- Capture server-wide missing index data (run on the target instance) SELECT mig.index_group_handle, mig.index_handle, mig.unique_compiles, migs.user_seeks, migs.user_scans, migs.avg_total_user_cost, migs.avg_user_impact, ROUND(migs.avg_total_user_cost * mig