12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
ADADADADAD
mysql数据库 时间:2024-11-26 22:15:34
作者:文/会员上传
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
pt-duplicate-key-checker功能介绍:从mysql表中找出重复的索引和外键,这个工具会将重复的索引和外键都列出来,并生成了删除重复索引的语句用法介绍:pt-duplicate-key-checker[OP
以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。
pt-duplicate-key-checker
功能介绍:
从mysql表中找出重复的索引和外键,这个工具会将重复的索引和外键都列出来,
并生成了删除重复索引的语句
用法介绍:
pt-duplicate-key-checker
[OPTION...]
[DSN]
包含比较多的选项,具体的可以通过命令pt-duplicate-key-checker --help来查看具体支持那些选项。
DSN为数据库或者表。
使用举例:
[root@idb4 ~]# pt-duplicate-key-checker --host=localhost --user=mdba --password=123456 --database=sjcj
# ########################################################################
# sjcj.ai_kp_xxfp
# ########################################################################
# FPDM is a left-prefix of fpdm_fphm_index
# Key definitions:
#KEY `FPDM` (`FPDM`),
#KEY `fpdm_fphm_index` (`FPDM`,`FPHM`)
# Column types:
# `fpdm` varchar(20) not null default '' comment '????'
# `fphm` varchar(20) not null default '0' comment '????'
# To remove this duplicate index, execute:
ALTER TABLE `sjcj`.`ai_kp_xxfp` DROP INDEX `FPDM`;
# ########################################################################
# sjcj.asb_download
# ########################################################################
# Uniqueness of id ignored because PRIMARY is a duplicate constraint
# id is a duplicate of PRIMARY
# Key definitions:
#UNIQUE KEY `id` (`id`) USING BTREE
#PRIMARY KEY (`id`),
# Column types:
# `id` int(12) not null auto_increment
# To remove this duplicate index, execute:
ALTER TABLE `sjcj`.`asb_download` DROP INDEX `id`;
# ########################################################################
# sjcj.ixinnuo_ptfp_zyfp_jsfp_dzfp_mx
# ########################################################################
# index_fpdm is a left-prefix of PRIMARY
# Key definitions:
#KEY `index_fpdm` (`FPDM`),
#PRIMARY KEY (`FPDM`,`FPHM`,`ID`),
# Column types:
# `fpdm` varchar(20) not null comment '????'
# `fphm` varchar(20) not null comment '????'
# `id` float not null comment '??'
# To remove this duplicate index, execute:
ALTER TABLE `sjcj`.`ixinnuo_ptfp_zyfp_jsfp_dzfp_mx` DROP INDEX `index_fpdm`;
# ########################################################################
# sjcj.jxfp
# ########################################################################
# jxfp_ind is a duplicate of idx_fpdm_fphm
# Key definitions:
#KEY `jxfp_ind` (`fpdm`,`fphm`),
#KEY `idx_fpdm_fphm` (`fpdm`,`fphm`)
# Column types:
# `fpdm` varchar(20) default null comment '????'
# `fphm` varchar(20) default null comment '????'
# To remove this duplicate index, execute:
ALTER TABLE `sjcj`.`jxfp` DROP INDEX `jxfp_ind`;
# ########################################################################
# Summary of indexes
# ########################################################################
# Size Duplicate Indexes702977946
# Total Duplicate Indexes 4
# Total Indexes179
11-20
11-19
11-20
11-20
11-20
11-19
11-20
11-20
11-19
11-20
11-19
11-19
11-19
11-19
11-19
11-19