In this post, I provide one script to find Index Usage Statistics of MySQL.
This is a very useful script for DBA to find out the usage of indexes and it can also take a decision to remove unused indexes.
Below is a two different way to find Index Usage.
First, using SHOW INDEX:
SHOW INDEX FROM TableName FROM DatabaseName
Second, using INFORMATION_SCHEMA.STATISTICS table:
WHERE table_schema = 'DatabaseName'
You can take a decision base on SEQ_IN_INDEX column data.
Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.
If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.
I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.