I enabled below variable in my.cnf:
log_slow_queries = "/var/log/mysql/mysql-slow.log"
long_query_time = 2
log-queries-not-using-indexes
and restarted the MySQL service. Then mysql-slow.log keeps recording 2 queries (both are small table with full scan, no index involved) repeatedly every 5 seconds. Both of the queries actually took less than 0.01 second. and the log file becomes bigger and bigger.
My server version: 5.5.31-0ubuntu0.12.04.1-log (Ubuntu).
I wonder how frequently the log file will do the writing job, even a redundant job? Can we control some other system variables to slow down this work? There are also some similar question, such as:
Mysql slow query log is logging faster queries
......
Can some experts explain it?
Thanks very much!