fkIndexCoverage
fkIndexCoverageAudit child-side foreign keys for missing supporting indexes and return uncovered FKs with suggested index columns to resolve gaps.
Instructions
Audit child-side foreign keys for missing supporting indexes. Returns only FKs not covered by an index starting with the FK columns in order, plus suggested index columns; use describeTable to inspect all keys and indexes of one table.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | No | Omit to scan the schema. | |
| schema | No | ||
| connection | Yes | Database to run against. Call listConnections for valid names; do not guess. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | No | ||
| schema | No | ||
| uncovered | No | Foreign keys that lack a supporting child-side index. | |
| tablesScanned | Yes | Number of tables inspected by the tool before caps were applied. | |
| uncoveredCount | Yes | Number of foreign keys without a supporting child-side index. | |
| foreignKeysTotal | Yes | Total number of foreign keys inspected for index coverage. |