查看指定表格的索引使用show index命令:
show index
show index from yourtable;
要查看特定schema的所有表格的索引,从INFORMATION_SCHEMA查询STATISTICS表:
INFORMATION_SCHEMA
STATISTICS
SELECT DISTINCT TABLE_NAME, INDEX_NAME FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = 'your_schema';
How to see indexes for a database or table?
Last updated 4 years ago