find_unused_indexes
Identify unused and duplicate indexes in MySQL databases to optimize performance by reducing storage space and improving write operations through index cleanup.
Instructions
Find unused and duplicate indexes in MySQL user tables.
Identifies:
Indexes with zero or very few reads since server start
Duplicate indexes (same columns in same order)
Redundant indexes (one index is a prefix of another)
Removing unused indexes can:
Reduce storage space
Speed up INSERT/UPDATE/DELETE operations
Reduce memory usage for index buffers
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys).
Based on information_schema and performance_schema statistics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema_name | No | Schema/database to analyze | |
| include_duplicates | No | Include analysis of duplicate/redundant indexes | |
| min_size_mb | No | Minimum index size in MB to include | |
| exclude_primary | No | Exclude primary keys from analysis |