MySQL查看哪些索引未使用

SELECT
OBJECT_SCHEMA,
OBJECT_NAME,
INDEX_NAME
FROM performance_schema.table_io_waits_summary_by_index_usage
WHERE INDEX_NAME IS NOT NULL
AND COUNT_STAR = 0
AND OBJECT_SCHEMA <> 'mysql'
ORDER BY OBJECT_SCHEMA,OBJECT_NAME;

参考网络资料:https://www.cnblogs.com/cchust/p/5061131.html

转载于:https://blog.51cto.com/liuzhanbin/2346810

你可能感兴趣的:(MySQL查看哪些索引未使用)