Duplicate index checker improved
I’ve just improved the MySQL duplicate index checker I whipped together a few days ago. As I guessed, my hasty coding left some things to be desired. I’ve fixed some bugs, added support for finding duplicate foreign keys, and switched to a command-line parsing library that comes standard with Perl, so it’s more convenient to run without needing to fetch modules from CPAN.
You can download it from the original article. Let me know if there’s anything I can do to improve it.

One more idea I had but never had time to implement is finding unused indexes. This could be done as running EXPLAINs on the queries from the log (UPDATE/DELETE need to be modified) and list of indexes compared to total list of indexes.
So you can see which indexes are used a lot which are used rarely and which are never used by this set of queries :)
Peter Zaitsev
8 Sep 06 at 9:43 am