Skip navigation links
Articles
Query Profiling Tools -- part 1, mysqlsla
Add to My Link Library +0 Vote Up -0Vote Down
The "sla" in mysqlsla stands for "statement log analyzer". This does a much better job than mysqldumpslow of analyzing your slow query log. In fact, you can sort by many different parameters -- by sheer number of times the query shows up in the slow query log, by the total or average query time, by the lock time, etc. This is really good for weeding out pesky entries in the slow query log that you do not care about. In this case, our client was using log-queries-not-using-indexes, so there was a lot of junk in the slow query log as well (for instance, every time a mysqldump backup was run, the slow query log got plenty of entries). In this case, I'm using --slow to read the slow query log at the filename specified, --flat to flatten all the text to lowercase (basically case-insensitive matching) and --sort at to sort by "average time".> ./mysqlsla --flat --slow ~mysql/var/mysql-slow.log --sort atReading slow log '~mysql/var/mysql-slow.log'.33274 total queries, 658 unique.Sorting by 'at'.__ 001 _______________________________________________________________________Count : 107 (0%)


Report this link: