Suite Orchestrator
indexing.sp_IndexOptimizationSuite — single entry point to run all tools in order with one call.
Tool Run Order
- Duplicate Index — first, so redundant indexes are flagged before key-lookup recommends new ones
- Key Lookup Elimination
- Unused Index Detection
- Missing Index (optimize-index)
- Expensive Query Analysis
- Column Access Patterns
@RunnableUnder
Controls auto-commenting of large index operations. Type: VARCHAR(20).
| Value | Behavior |
|---|---|
| NULL (default) | Everything uncommented, no threshold |
| '2' | 2 GB threshold for both editions |
| '1,5e' | 1 GB for Standard, 5 GB for Enterprise (online rebuilds) |
Parses into @ThresholdStd and @ThresholdEnt, resolves to @ActiveThreshold based on edition.
@LinkedServer
Type: BIT, default 0. When 1, post-processes the combined output so each statement is wrapped in EXEC('USE [db]; ...') AT [server];.
- Comments stay outside the EXEC wrapper (readable in SSMS)
- Each CREATE/DROP pair gets its own EXEC AT
- Commented-out blocks wrap around the EXEC
- Requires
@CombinedOutput = 1
@CombinedOutput
When 1, returns one script organized by database → table → tool instead of one row per tool. Every finding for a table is grouped with tool headers.
Error Handling
Each tool runs in its own TRY/CATCH. A failure in one tool does not stop the rest.
Full Parameters
See Quick Start for the complete parameter reference.