I'm running mysql 5.5 and am debugging a performance issue. I have enabled mysql slow logging. These are my relevant settings in my.cnf:
log_slow_queries = /var/log/mysql/mysql-slow.log
long_query_time = 10
log-queries-not-using-indexes
Mysql is indeed creating and writing to a slow query log. However, it logging lots of queries that run much, much quicker than specified by the long_query_time parameter.
Here are a couple examples of that:
# Query_time: 0.000142 Lock_time: 0.000039 Rows_sent: 1 Rows_examined: 1
# Query_time: 0.000081 Lock_time: 0.000024 Rows_sent: 1 Rows_examined: 1
# Query_time: 0.000116 Lock_time: 0.000034 Rows_sent: 1 Rows_examined: 1
There are actually no instances of queries that have query or lock times that, together, add up to anything greater than 0.1. From my reading of what the long_query_time parameter is supposed to do, I would not expect to find those queries in the slow query log.