mysqlindexcheck

Note that mysqlindexcheck ignores descending indexes. For example, full_name_desc (first_name descending and last_name) is treated as a duplicate index of full_name (first_name and last_name):

shell> mysqlindexcheck --server=<user>:<pass>@localhost:3306 employees --show-drops WARNING: Using a password on the command line interface can be insecure.# Source on localhost: ... connected.# The following indexes are duplicates or redundant for table employees.employees:#CREATE INDEX `full_name_desc` ON `employees`.`employees` (`first_name`, `last_name`) USING BTREE#     may be redundant or duplicate of:CREATE INDEX `full_name` ON `employees`.`employees` (`first_name`, `last_name`) USING BTREE#CREATE INDEX `first_name` ON `employees`.`employees` ...

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.