MySQLlogging缓慢的查询

我已经告诉MySQLlogging需要比一秒钟(configuration中的1 )更长的查询…但是我看到这样的查询花费的时间比一秒钟less…

 # Time: 101108 6:39:32 # User@Host: source_member[source_member] @ localhost [] # Query_time: 0.007271 Lock_time: 0.000062 Rows_sent: 1 Rows_examined: 2635 SET timestamp=1289216372; SELECT id, name, email, auth_key FROM member INNER JOIN source_member.group_assoc ON ( source_member.group_assoc.group_id = 121 AND source_member.group_assoc.member_id = member.id ); 

我的设置是…

 log_slow_queries = /var/log/mysql/mysql-slow.log long_query_time = 1 log-queries-not-using-indexes 

我应该问…这意味着它只logging没有任何索引的查询?

什么是long_query_time设置为? log-long-format或log-queries-not-using-indexes active?

最可能的解释是不正确的日志logging设置。

–log-queries-not-using-indexes和log-long-format都会导致不使用索引的查询被logging。 有时不使用索引速度更快,这可能会导致大量日志垃圾邮件。

另外请注意,您可能会在某处lockingIO。 long_query_time是根据WALL时间而不是CPU时间进行检查的。