SQL Server Optimization Suite
Comprehensive SQL Server index optimization toolkit. Eight tools for finding what's missing, removing what's redundant, and diagnosing what the optimizer doesn't tell you.
Tools
Duplicate Index
Detects duplicate, redundant, and combinable indexes. Generates DROP and COMBINE scripts.
Key Lookup Elimination
Finds key lookups in the plan cache and recommends INCLUDE columns to eliminate them.
Unused Index Detection
Identifies indexes with zero reads and active writes. DISABLE or DROP with confidence levels.
Missing Index
DMV-based recommendations with multi-stage consolidation. Detects extend/rebuild opportunities.
Expensive Query
Plan cache analysis for table scans, missing index hints, and query regressions.
Column Access Patterns
Discovers frequently filtered/joined/sorted columns for composite index opportunities.
Query Plan Analysis
One-off diagnostic: stale stats, missing indexes, implicit conversions, cardinality issues.
sp_helpindexUsage
Enhanced index info combining structure, usage stats, and sizes in one result set.
Suite
- Orchestrator (
sp_IndexOptimizationSuite) — runs all tools in order with one call - Suite Summary (
sp_IndexingSuiteSummary) — fleet-wide reporting across all tools
See What the Suite Produces
The suite tracks every optimization it makes. Run sp_IndexingSuiteSummary, paste the results into an AI tool, and generate a visual dashboard like this:
Real production results: 338B reads eliminated, 1.57 TB disk freed, 37,719 findings resolved across 50 servers.
Quick Start
-- Run ALL optimization tools in one call
EXEC optimize.sp_IndexOptimizationSuite @Databases = 'MyApp_%', @RunnableUnder = '1,5e';
-- Combined output with linked server support
EXEC optimize.sp_IndexOptimizationSuite @Databases = 'MyApp_%', @RunnableUnder = '1,5e',
@CombinedOutput = 1, @LinkedServer = 1;
-- Diagnose a specific slow query
EXEC optimize.sp_AnalyzeQueryPlan @SQL = 'SELECT ...', @Databases = 'MyDatabase';
-- Fleet-wide summary
EXEC optimize.sp_IndexingSuiteSummary @Days = 7, @Detail = 1;
See Quick Start for the full parameter reference.
Maintenance
Index Maintenance
Automated defragmentation with edition-aware REORG/REBUILD, ONLINE fallback, time limits, and full history logging.
Statistics Maintenance
Stale statistics detection and targeted updates based on modification rates and table size.
Reference
- Installation — prerequisites, install steps, verification, upgrading
- Architecture — schema objects, size estimation, display conventions
- Technical Conventions — @RunnableUnder parsing, @LinkedServer post-processing, enterprise detection
- License — MIT License
Tip: To view output scripts with proper formatting, see SSMS Settings.