我正在使用一个mysql服务器,我在其中设置了慢查询日志,设置如下
log-slow-queries=/var/log/mysql/mysql-slow-queries.log
long_query_time=1
log-queries-not-using-indexes
我在 mysql 事件中为每一分钟设置了以下事件。
UPDATE mytable SET playing = 0
WHERE playing != 0
AND ( TIMESTAMPDIFF( MINUTE , lastplayed, NOW( )) >10 )
OR ( lastplayed IS NULL
AND ispresent= 0
);
现在所有这些列playing, lastplayed, and ispresent
都已编入索引,但这仍然出现在慢查询日志中,并带有以下详细信息
# Query_time: 0.000585 Lock_time: 0.000159 Rows_sent: 0 Rows_examined: 316
为什么这个查询显示在慢日志中?