As of MySQL 5.1 get MySQL slow query log logged in mysql.slow_log
table instead of the file as you had in previous versions.
We rarely would use this feature as it is incompatible with our
slow query analyses patch and tools
Fixing this is not trivial while staying 100% compatible to
standard format as TIME type which is used to store query
execution time and lock time does not store fractions of the
second.
Today I've got some time to play with table based slow query log in production while tuning one of the systems. It is pretty nice to be able to work with data in SQL as it easy to filter all queries which happened within certain time interval (ie after I've done some changes) or filter out queries which you already looked at using LIKE statement.
As default table format for slow_log is CSV with no indexes …
[Read more]