![](https://secure.gravatar.com/avatar/4a81ad68d36ab4fdbf830ccb4db35769.jpg?s=120&d=mm&r=g)
Hi On 10/03/2010, at 9:29 PM, worklog-noreply@askmonty.org wrote:
----------------------------------------------------------------------- WORKLOG TASK -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =- TASK...........: Index usage tracker CREATION DATE..: Wed, 10 Mar 2010, 11:29 SUPERVISOR.....: Bothorsen
DESCRIPTION:
What indexes are needed is often easy to find. What is more difficult is to find which indexes are not used at all.
Thus some statistics about the index usage would be nice.
I think Percona has already something like this done some time ago. And big O has similar functionality.
For appropriate credit: it comes from the Google patches, released by Mark Callaghan. It's in the Percona and OurDelta 5.0 builds. SHOW INDEX STATISTICS, or more useful the INDEX_STATISTICS table in information_schema. More useful since then it can be LEFT JOINed onto the other infoschema tables that know which indexes exist, thus easily identifying unused ones. For reference on what the table shows, see the patch - easy to find in the lp:ourdelta repo. Let's not just reinvent from scratch please. Regards, Arjen. -- Arjen Lentz, Exec.Director @ Open Query (http://openquery.com) Exceptional Services for MySQL at a fixed budget. Follow our blog at http://openquery.com/blog/ OurDelta: packages for MySQL and MariaDB @ http://ourdelta.org