为什么mysql的slowlog记录了查询时间很短的日志?
The slow query log consists of all SQL statements that took more than long_query_time
seconds to execute and (as of MySQL 5.1.21) required at least min_examined_row_limit
rows to be examined.
系统里
| long_query_time | 1.000000 |
| min_examined_row_limit | 0 |
为啥slowlog里很多1s不到的记录?
问了公司的牛人,答案:
| log_queries_not_using_indexes | ON |
set global log_queries_not_using_indexes='0'即可