On this page
FIND INDEX
Core command
FIND INDEXES
FI IX
FIIX
Finds indexes whose name, table or columns contain the input text.
Syntax
FIND INDEX <text>
Arguments
| Argument | Required | Values | Default |
|---|---|---|---|
<text> | Yes | Part of an index, table or column name, in any case | None |
Examples
FIND INDEX ORDERS;
FIND INDEXES CUSTOMER_ID;
Details
Matching
Every index of the current schema whose name, table or one of whose columns contains the text is listed. Matching ignores case; % matches any text and _ any single character.
Output
One row per indexed column, with its position (#) and UNIQUE or NON-UNIQUE. Every column of a matching composite index is listed, even when only one of them matched. Table statistics are never shown as indexes.
Performance and errors
The command reads the same metadata as SHOW INDEXES, table by table, so a large schema takes a moment. It fails when no text is given or when the JDBC driver cannot provide index metadata.
Related
- SHOW INDEXES, the indexes of one table
- FIND FK
- FIND COLUMN
Used in these how-tos
Last modified in release 5.5.0.
Found something wrong or unclear on this page? Tell us, with the page address.