analyze_indexes
Analyze database index usage to identify unused indexes, missing indexes, and unindexed foreign keys.
Instructions
Analyze index usage statistics to find unused indexes wasting space and missing indexes causing slow sequential scans. Also detects unindexed foreign keys.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "analyze_indexes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | Database schema to analyze (default: public) | public |
| mode | No | Analysis mode: 'usage' for unused index detection, 'missing' for missing index suggestions, 'all' for both | all |
| timeout_ms | No | Connection timeout in milliseconds (default: 30000). Increase for slow or remote databases. |