diff --git a/sql-statements/sql-statement-show-indexes.md b/sql-statements/sql-statement-show-indexes.md index 30e97557594cb..e5e41e74ffefb 100644 --- a/sql-statements/sql-statement-show-indexes.md +++ b/sql-statements/sql-statement-show-indexes.md @@ -10,25 +10,14 @@ The statement `SHOW INDEXES [FROM|IN]` lists the indexes on a specified table. T ## Synopsis -**ShowIndexStmt:** +```ebnf+diagram +ShowIndexStmt ::= + "SHOW" ( "INDEX" | "INDEXES" | "KEYS" ) ("FROM" | "IN" ) TableName (("FROM" | "IN") SchemaName )? ShowLikeOrWhereOpt? -![ShowIndexStmt](/media/sqlgram/ShowIndexStmt.png) - -**ShowIndexKwd:** - -![ShowIndexKwd](/media/sqlgram/ShowIndexKwd.png) - -**FromOrIn:** - -![FromOrIn](/media/sqlgram/FromOrIn.png) - -**TableName:** - -![TableName](/media/sqlgram/TableName.png) - -**ShowLikeOrWhereOpt:** - -![ShowLikeOrWhereOpt](/media/sqlgram/ShowLikeOrWhereOpt.png) +ShowLikeOrWhere ::= + "LIKE" SimpleExpr +| "WHERE" Expression +``` ## Examples @@ -73,3 +62,7 @@ The `SHOW INDEXES [FROM|IN]` statement in TiDB is fully compatible with MySQL. I * [SHOW CREATE TABLE](/sql-statements/sql-statement-show-create-table.md) * [DROP INDEX](/sql-statements/sql-statement-drop-index.md) * [CREATE INDEX](/sql-statements/sql-statement-create-index.md) +* [`information_schema.TIDB_INDEXES`](/information-schema/information-schema-tidb-indexes.md) +* [`information_schema.TIDB_INDEX_USAGE`](/information-schema/information-schema-tidb-index-usage.md) +* [`information_schema.KEY_COLUMN_USAGE`](/information-schema/information-schema-key-column-usage.md) +* [`sys.schema_unused_indexes`](/sys-schema/sys-schema-unused-indexes.md)