mysql检测重复索引
来源:互联网 发布:宇宙沙盒 mac 编辑:程序博客网 时间:2024/06/03 16:25
mysql居然可以在相同的字段上重复建索引,oracle是不行的。需要安装pt-query-digest。
[root@VM-10 ~]# pt-duplicate-key-checker -h10.10.11.208 -uroot -proot -P3316 --charset=gbk
# ######################################################################### test.app_chat_message
# ########################################################################
# idx_app_chat_message_to_user_from_user is a left-prefix of Index 3
# Key definitions:
# KEY `idx_app_chat_message_to_user_from_user` (`to_user`,`from_user`),
# KEY `Index 3` (`to_user`,`from_user`,`message_id`),
# Column types:
# `to_user` varchar(50) not null default ''
# `from_user` varchar(50) not null default ''
# `message_id` varchar(40) not null default ''
# To remove this duplicate index, execute:
ALTER TABLE `test`.`app_chat_message` DROP INDEX `idx_app_chat_message_to_user_from_user`;
# Key definitions:
# KEY `Index 2` (`to_user`,`from_user`),
# KEY `Index 3` (`to_user`,`from_user`,`message_id`),
# Column types:
# `to_user` varchar(50) not null default ''
# `from_user` varchar(50) not null default ''
# `message_id` varchar(40) not null default ''
# To remove this duplicate index, execute:
ALTER TABLE `test`.`app_chat_message` DROP INDEX `Index 2`;
# ########################################################################
# test.pub_user
# ########################################################################
# phone is a duplicate of phone_idx
# Key definitions:
# KEY `phone` (`phone`),
# KEY `phone_idx` (`phone`),
# Column types:
# `phone` varchar(15) collate utf8_bin default null
# To remove this duplicate index, execute:
ALTER TABLE `test`.`pub_user` DROP INDEX `phone`;
# email is a duplicate of email_idx
# Key definitions:
# KEY `email` (`email`),
# KEY `email_idx` (`email`),
# Column types:
# `email` varchar(50) collate utf8_bin default null
# To remove this duplicate index, execute:
ALTER TABLE `test`.`pub_user` DROP INDEX `email`;
# account is a duplicate of account_idx
# Key definitions:
# KEY `account` (`account`),
# KEY `account_idx` (`account`),
# Column types:
# `account` varchar(50) collate utf8_bin default null
# To remove this duplicate index, execute:
ALTER TABLE `test`.`pub_user` DROP INDEX `account`;
#########################################################################
.........................................................................
.........................................................................
# Size Duplicate Indexes 20358902596
# Total Duplicate Indexes 17
# Total Indexes 664
0 0
- mysql检测重复索引
- MySQL查找重复索引和冗余索引
- mysql快速检测字段里数据重复
- mysql对重复数据新建唯一索引
- MySQL查询重复及冗余索引sql
- MySQL中重复索引和重复外键清理
- MySQL中重复索引和重复外键清理
- MYSQL中重复的索引和多余的索引
- MySQL优化,索引和索引的使用和检测索引是否有效
- mysql字段类型 唯一索引 记录不重复设置
- MYSQL如何忽略重复记录,添加唯一索引
- mysql 给有重复记录的表添加唯一索引
- Mysql添加唯一索引时,删除重复记录
- mysql中有重复数据建唯一索引
- Mysql建立索引,找出重复纪录,删除重复的纪录,ultraedit使用小技巧
- mysql将普通索引更改为唯一索引,且对重复的数据只保留一条
- 数据库索引:唯一索引【便捷的无重复插入记录的方法(基于mysql)和索引设计思想小结】
- 重复索引与冗余索引
- python 学习非常好的博客
- 主线程实现异步
- 【Unity】常用代码
- Android系统五大布局详解Layout
- C语言易混淆关键词详解-const, static, extern, typedef, 声明
- mysql检测重复索引
- VCTransitionsLibrary –自定义iOS交互式转场动画的库
- 反射
- HDU 1215 七夕节(因子和)
- ant 读取环境变量的值
- 页面跳转与传值
- centos7 安装mysql
- HDOJ 4453 Looploop Splay
- sql server 查看锁表SQL