# How to tell which indices are NOT helping

**URL:** <https://forums.percona.com/t/how-to-tell-which-indices-are-not-helping/1128>\
**Category:** Other MySQL® Questions\
**Created:** [March 23, 2009, 6:33pm UTC](https://forums.percona.com/t/how-to-tell-which-indices-are-not-helping/1128 "2009-03-23T18:33:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjs9876543210](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mjs9876543210](https://forums.percona.com/u/mjs9876543210)\
**Post date:** [March 23, 2009, 6:33pm UTC](https://forums.percona.com/t/how-to-tell-which-indices-are-not-helping/1128/1 "2009-03-23T18:33:06Z")

</div>

Hi –

I have a database with a plethora of inherited indices.

Is there a systematic way to tell whether an index is getting used, other than replaying “EXPLAIN” statements and using a process of elimination?

I understand how to tell, on any given query, the set of indices used. I’m hoping that there is a more systematic answer – e.g. given all queries executed by this server since some point in time, how often is a specific index used.

Thanks,  
Mike

---

<div class="post-metadata">

**Author:** ![januzi](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@januzi](https://forums.percona.com/u/januzi)\
**Post date:** [March 23, 2009, 7:54pm UTC](https://forums.percona.com/t/how-to-tell-which-indices-are-not-helping/1128/2 "2009-03-23T19:54:41Z")

</div>

[URL][Percona Open Source Software Documentation](http://www.percona.com/docs/wiki/release:5075-b12%5B/URL%5D) , userstatsv2.patch

This patch should be usefull.

---

<div class="post-metadata">

**Author:** ![mjs9876543210](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mjs9876543210](https://forums.percona.com/u/mjs9876543210)\
**Post date:** [March 23, 2009, 9:21pm UTC](https://forums.percona.com/t/how-to-tell-which-indices-are-not-helping/1128/3 "2009-03-23T21:21:53Z")

</div>

Januzi –

Thanks very much for the pointer – sounds perfect if I can afford the time/risk to deploy a patched server.

I’d appreciate any ideas that don’t require this patch.

Thanks.

---

<div class="post-metadata">

**Author:** ![pedro](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@pedro](https://forums.percona.com/u/pedro)\
**Post date:** [March 24, 2009, 8:35am UTC](https://forums.percona.com/t/how-to-tell-which-indices-are-not-helping/1128/4 "2009-03-24T08:35:11Z")

</div>

[URL][http://hackmysql.com/mysqlidxchk[/URL]](http://hackmysql.com/mysqlidxchk%5B/URL%5D)
