MySQL, MariaDB and slow queries

mammoth_versus_dolphin_500.jpg I have been following MySQL saga with Sun and Oracle for quite some time, mostly because we decided to go mainstream with our Koha installation and use MySQL instead of PostgreSQL because it's support is experimental.

It seems that MariaDB is the future of MySQL if you trust Monty. There is also Drizzle but it's different enough that it's not considered drop-in replacement for MySQL. So, now that I have some hope that MySQL is here to stay I needed to find a quick way to analyze my performance on it.

And there is a great way to see overview of your slow query log: mk-query-digest. It's part of Maatkit which is very interesting and useful project for MySQL DBAs. So, with something like:

dpavlin@mjesec:~$ wget -q http://maatkit.org/get/mk-query-digest
dpavlin@mjesec:~$ perl mk-query-digest /var/log/mysql/mysql-slow.log
You will get nice report about your queries. Very useful.