unusedIndexes
unusedIndexesIdentify unused non-primary or non-unique indexes with zero recorded scans, using workload counters, to surface removal candidates after representative database traffic.
Instructions
Find non-PK/non-unique indexes with zero recorded scans as removal candidates. Unlike redundantIndexes, this uses workload counters, which are meaningful only after representative traffic and are not supported by every engine.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | ||
| connection | Yes | Database to run against. Call listConnections for valid names; do not guess. | |
| minSizeBytes | No | Minimum size in bytes; omit tiny indexes. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Additional context about support, limits, interpretation, or engine-specific behavior. | |
| count | Yes | Number of unused indexes returned. | |
| schema | No | ||
| indexes | No | Indexes available on the table or returned by an index-statistics scan. | |
| supported | Yes | True when this tool is supported for the current database engine and privileges. |