mysql 统计索引执行情况

select distinct b.TABLE_SCHEMA,b.TABLE_NAME , b.INDEX_NAME , a.count_star
from performance_schema.table_io_waits_summary_by_index_usage a ,
INFORMATION_SCHEMA.STATISTICS b
where a.OBJECT_SCHEMA = b.TABLE_SCHEMA and a.INDEX_NAME = b.INDEX_NAME
and a.OBJECT_NAME=b.TABLE_NAME and a.OBJECT_SCHEMA =b.INDEX_SCHEMA
and b.CARDINALITY > 0
and b.TABLE_NAME = 'wu_user';

 

http://codercoder.cn/index.php/2019/09/mysql-index-statistic-info/

posted @ 2019-11-03 21:38  newlangwen  阅读(333)  评论(0编辑  收藏  举报