PQA – Query Analyzer for MySQL/PostgreSQL
I found a nice program PQA written in Ruby to show query statistics based on database logs. That sound like almost exactly what I needed, so I tried it on MySQL MT log files and some other data. There were a few bugs that I fixed.
In addition I added a new report printing unique queries and when they occurred. It seems to work fine and with help of awk/make/gnuplot generated a few nice graphs.