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

Removing duplicate and redundant indexes

You can define several indexes on a column. By mistake, you might have defined the same index again (same column, same order of columns, or same order of keys), which is called a duplicate index. If only partial indexes (leftmost columns) are repetitive, they are called redundant indexes. A duplicate index has no advantages. Redundant indexes might be useful in some cases (a use case is mentioned in the note at the end of this section), but both slow down the inserts. So, it is important to identify and remove them.

There are three tools that can help with finding out duplicate indexes:

  • pt-duplicate-key-checker, which is part of the Percona Toolkit. Installing the Percona Toolkit is covered in Chapter ...

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