I am trying to write a script to parse the MySQL slow query log. I have seen 1 or 2 parser.
does anyone know how to extract the information from that log? I mean does anyone know the structure of the file so I can work with that and if anyone know a good parser for this log file?
thanks
This is a good read and suggests some tools: http://www.mysqlperformanceblog.com/2006/09/06/slow-query-log-analyzes-tools/
Just in case you miss it: http://www.maatkit.org/doc/mk-query-digest.html is the suggested tool. But worth a read anyway.
If you have to write somethin on your own there seems to be a handy perl module on cpan. https://metacpan.org/pod/MySQL::Log::ParseFilter