Skip to content

Instantly share code, notes, and snippets.

@theprogrammerin
theprogrammerin / mysql_slow_log_parser
Last active May 2, 2019 14:37
Mysql slow query [file] log parser. It combines multi line log into a single line. Also adds a generalised query be replacing query data with 'XXX' which can then be used to identify the slow query pattern.
#!/usr/bin/perl
#
# Ashutosh Agrawal
# http://blog.theprogrammer.in
#
# 2014-11-20 v1.0
#
# This script is modified version of SQL parser written by
#
# Nathanial Hendler