首页 > 数据库技术 > 详细

MySQL部分索引

时间:2018-06-05 00:01:59      阅读:255      评论:0      收藏:0      [点我收藏+]

部分索引

char/varchar2太长,全部做索引的话,效率低,浪费存储空间

select avg(length(username)) from 

索引统计:

  • show index from table
  • select * from I_S.STATISTICS
  • mysql.innodb_index_stats

MySQL5.7索引利用率:

select index_name,rows_selected,rows_updated,rows_deleted from schema_index_statistics where table_schema=‘scott‘ and table_name=‘emp‘;

查看冗余索引:schema_redundant_indexes

索引隐式转换:

select * from t1 where user=123; 不会利用user列的索引,首先将user转换成assic码

MySQL部分索引

原文:https://www.cnblogs.com/elontian/p/9136479.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!