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.
Asked
Active
Viewed 2,195 times
0
-
1Please specify... Maybe you mean '... table that is read the _most_...' Also it is quite difficult to know what you mean by 'maximum hits on a table' ? – mjv Dec 27 '12 at 14:48
-
Check out http://stackoverflow.com/q/6137935/384155 – Osiris Dec 27 '12 at 14:50
2 Answers
1
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).

Andreas Wederbrand
- 38,065
- 11
- 68
- 78
-
-
-
I have not used this percona tool before but I will study on this. I am still wondering why my question has been closed and down-voted! – gurudeb Jan 03 '13 at 19:08
0
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.

Ask Bjørn Hansen
- 6,784
- 2
- 26
- 40
-
-
You are welcome. I'm not sure why your question was closed, either. Andreas's recommendation of the percona-toolkit is a good one. – Ask Bjørn Hansen Jan 03 '13 at 22:04