O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

pt-duplicate-key-checker

pt-duplicate-key-checker gives the exact ALTER statements to drop duplicate keys:

shell> pt-duplicate-key-checker -u <user> -p<pass># A software update is available:# ######################################################################### employees.employees                                                     # ######################################################################### full_name_1 is a duplicate of full_name# Key definitions:#   KEY `full_name_1` (`first_name`,`last_name`),#   KEY `full_name` (`first_name`,`last_name`),# Column types:#      `first_name` varchar(14) not null#      `last_name` varchar(16) not null# To remove this duplicate index, execute:ALTER TABLE `employees`.`employees` DROP INDEX `full_name_1`;# first_name is a left-prefix of full_name# Key definitions: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required