sqlserver-index-management

Analyze SQL Server index fragmentation and generate maintenance scripts.

Updated Feb 19, 2026
One-click install
npx skills add https://github.com/rudi-bruchez/dba-skills --skill sqlserver-index-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sqlserver-index-management
Source: https://github.com/rudi-bruchez/dba-skills/tree/main/skills/sqlserver-index-management
Command: npx skills add https://github.com/rudi-bruchez/dba-skills --skill sqlserver-index-management

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses slow database query performance caused by inefficient or missing indexes, and helps maintain optimal index health in SQL Server.

Core Features & Use Cases

  • Fragmentation Analysis: Identifies and provides solutions for index fragmentation.
  • Missing Index Detection: Recommends and helps create indexes that the optimizer suggests are missing.
  • Unused Index Identification: Flags indexes that are not being used, saving resources.
  • Maintenance Strategy: Offers scripts for both reorganizing and rebuilding indexes based on fragmentation levels.
  • Use Case: A critical application is experiencing slow response times. You suspect index issues. This Skill can analyze fragmentation, identify missing indexes that could speed up specific queries, and suggest or execute maintenance tasks like rebuilding or reorganizing indexes.

Quick Start

Analyze index fragmentation for all indexes in the current database.

Frequently Asked Questions about sqlserver-index-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix SQL Server index fragmentation to improve database performance?

To fix SQL Server index fragmentation, you can use T-SQL scripts to reorganize or rebuild indexes based on their fragmentation levels, restoring database performance and query speed.

How do I find missing indexes in SQL Server for query optimization?

You can find missing indexes in SQL Server by analyzing optimizer recommendations, which detect and suggest indexes that could speed up specific queries and resolve slow response times.

What is the best way to identify unused indexes in a SQL Server database?

The best way to identify unused indexes in a SQL Server database is to analyze index usage stats, flagging indexes that are not being used so you can remove them and save system resources.

Does this index management approach work with SQL Server 2016 and later versions?

Yes, this index management approach works with SQL Server 2016 and later versions, providing fragmentation analysis, missing index detection, and maintenance scripts for those environments.

When should I reorganize indexes instead of rebuilding them in SQL Server?

You should reorganize indexes instead of rebuilding them in SQL Server based on specific fragmentation levels, using T-SQL maintenance scripts to determine the appropriate operation for optimal index health.