Checking index usage

In the preceding section, you learned about removing redundant and duplicate indexes. While designing an application, you might have thought about filtering a query based on a column and added index. But over a period of time, because of changes in the application, you might not need that index. In this section, you will learn about identifying those unused indexes.

There are two ways you can find unused indexes:

  • Using pt-index-usage (covered in this section)
  • Using sys schema (covered in the next section)

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.