Find out usage statistics of MySQL indices?

Yes, it is. You should query Performance Schema:

select * from performance_schema.table_io_waits_summary_by_index_usage
where object_schema="your_schema"

The count_star column show how many times each index was used since MySQL was started. If you add the following, you got the never used indexes:

and count_star = 0

Leave a Comment

tech