get_index_stats
Analyze MySQL table index statistics to identify low cardinality, oversized, and infrequently used indexes for performance optimization.
Instructions
Get detailed index statistics for MySQL user tables.
Returns:
Index cardinality and selectivity
Index size and memory usage
Read/write operation counts
Index efficiency metrics
Helps identify:
Low cardinality indexes
Oversized indexes
Infrequently used indexes
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema_name | No | Schema/database to analyze | |
| table_name | No | Specific table to analyze (optional) | |
| order_by | No | Order results by | size |
Input Schema (JSON Schema)
{
"properties": {
"order_by": {
"default": "size",
"description": "Order results by",
"enum": [
"size",
"reads",
"cardinality",
"name"
],
"type": "string"
},
"schema_name": {
"description": "Schema/database to analyze",
"type": "string"
},
"table_name": {
"description": "Specific table to analyze (optional)",
"type": "string"
}
},
"required": [],
"type": "object"
}