Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8628519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:33:56+00:00 2026-06-12T08:33:56+00:00

I am cleaning up duplicate indices from (innodb)tables in a mysql database. The database

  • 0

I am cleaning up duplicate indices from (innodb)tables in a mysql database. The database has about 50 tables.

While I can check for duplicate keys using pt-duplicate-key-checker, I was wondering if there is a tool that could help me find out least recently used indices from all the tables.

For eg. , if table “A” has three indices defined “index_1”, “index_2” and “index_3”, and out of them “index_3” is used least frequently , assume its used every 1/10000 queries made on the table, then the output of the script or tool should be “index_3”.

Is there a good way or a tool that could help me run this analysis on the database?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:33:57+00:00Added an answer on June 12, 2026 at 8:33 am

    Starting with MySQL 5.6, the performance_schema instruments table io, and computes aggregated statistics by table, and by index.

    See table performance_schema.table_io_waits_summary_by_index_usage:

    http://dev.mysql.com/doc/refman/5.6/en/table-waits-summary-tables.html#table-io-waits-summary-by-index-usage-table

    Finding the least recently used index involves time and timestamps.

    What the performance schema measure is counting io against an index, so it can be used to find the least often used index, which in practice should be pretty close.

    Full example here:

    http://sqlfiddle.com/#!9/c129c/4

    Note: This question is also duplicated in

    https://dba.stackexchange.com/questions/25406/find-least-recently-used-mysql-table-index

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there an easier way of cleaning up a database that has a ton
I'm cleaning some text from unwanted HTML tags (such as <script> ) by using
After cleaning a folder full of HTML files with TIDY, how can the tables
I've been cleaning up some code from a module I'm extending and I can't
While cleaning some code today written by someone else, I changed the access modifier
I'm cleaning up CSS from a previous designer. The file is messy. One example
I'm using PRG for cleaning up my posts in MVC On the POST action
While cleaning up some old php scripts I've noticed some weird behavior with require/include
I am cleaning up some of our network-code and while replacing various integer types
This might be a duplicate question but as you can see they didn't get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.