说明: where 1=1 ,是系统框架自动补全的,目的是防止SQL语句没有where 条件,这个是无碍的。
确信 整个语句就是全表扫描,问题是为什么它记录下来的扫描行数只是表数据的一小部分?也没有limit限制啊?
3.官方文档对慢日志的定义
The slow query log consists of SQL statements that take more than long_query_time seconds to execute and require at least min_examined_row_limit rows to be examined. The slow query log can be used to find queries that take a long time to execute and are therefore candidates for optimization.
The time to acquire the initial locks is not counted as execution time. mysqld writes a statement to the slow query log after it has been executed and after all locks have been released, so log order might differ from execution order. • Query_time: duration
The statement execution time in seconds. • Lock_time: duration
The time to acquire locks in seconds. • Rows_sent: N
The number of rows sent to the client.
• Rows_examined: The number of rows examined by the server layer (not counting any processing internal to storage engines).
这些知识对描述的疑惑没有直接帮助。还需我们继续探寻。
4. 猜想