开发者

mysql slow query log

开发者 https://www.devze.com 2023-01-04 20:29 出处:网络
I am trying to wri开发者_开发百科te a script to parse the MySQL slow query log. I have seen 1 or 2 parser.

I am trying to wri开发者_开发百科te 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


The mysqldumpslow tool comes with MySQL and is useful in some cases for parsing the slow query log.

You should try it out:

http://dev.mysql.com/doc/refman/5.1/en/mysqldumpslow.html

0

精彩评论

暂无评论...
验证码 换一张
取 消