Question

I need to do some analysis of table usage within my MySQL system. Can anyone point me in the right direction on a method for identifying which table has been queried most often in a given time-period i.e. if there are 30 tables, I want to know which table is accessed most.

Was it helpful?

Solution

You should use pt-table-usage to analyze the general query log. It will out put nice information about table usage (as long as you're not using stored procedures or stored functions cause those will be missed).

OTHER TIPS

Enable query logging temporarily while your application is running and review the log. It can have some performance impact, so you don't want to leave it permanently enabled.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top