Mysql checks duplicate indexes and mysql checks indexes.
Mysql can re-create an index on the same field, but oracle cannot. Installation requiredPt-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 ';
# Index 2 is a left-prefix of Index 3
# 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 'mail ';
# 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 indextes 20358902596
# Total Duplicate Indexes 17
# Total Indexes 664
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.