MySQL索引的维护与优化——查找重复及冗余索引
2017-09-30 00:00
232 查看
方法一:通过MySQL的information_schema数据库 查找重复与冗余索引
方法二:通过工具
查找重复与冗余索引
参考慕课网:http://www.imooc.com/video/3998
SELECT a.table_schema AS '数据库', a.table_name AS '表名', a.index_name AS '索引1', b.index_name AS '索引2', a.column_name AS '重复列名' FROM information_schema.statistics a JOIN statistics b ON a.table_schema = b.table_schema AND a.table_name = b.table_name AND a.seq_in_index = b.seq_in_index AND a.column_name = b.column_name WHERE a.seq_in_index = 1 AND a.index_name != b.index_name
方法二:通过工具
用pt-duplicate-key-checker 工具检查重复及冗余索引 使用方法 pt-duplicate-key-checker -hxxx -uxxx -pxxx
查找重复与冗余索引
参考慕课网:http://www.imooc.com/video/3998
相关文章推荐
- OGG运维优化脚本(九)-查询维护类--进程重复表检查
- MySQL查找重复索引和冗余索引
- mysql优化----大数据下的分页,延迟关联,索引与排序的关系,重复索引与冗余索引,索引碎片与维护
- bzoj3963 [WF2011]MachineWorks(斜率优化 & splay维护动态凸包)
- sql不重复的查找统计数据
- 第十章——维护索引(5)——查找丢失索引
- 查找一个数据字符串中重复的子串
- Mysql索引的优化
- MySQL索引及查询优化书目录
- rac insert速度十分缓慢,索引维护浪费大量时间,如何优化?
- LeetCode Longest Substring Without Repeating Characters 最长不重复子串查找
- JS 之 查找数组中重复的元素
- 对使用in_array()对同一个数组多次查找不同值时效率低下的优化策略
- SQL查找删除重复行
- [DP 可并堆维护凸包优化] BZOJ 4585 [Apio2016]烟火表演
- SQL语句查找重复记录
- 各种查找重复记录的语句
- 一个Netfilter nf_conntrack流表查找的优化-为conntrack增加一个per cpu cache
- DWR3.0框架入门(3) —— ScriptSession的维护及优化
- 数据库查询优化——Mysql索引