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.
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. |