Query_time: duration语句执行时间(以秒为单位) Lock_time: duration在几秒钟内获得锁定的时间 Rows_sent: N发送到客户端的行数。 Rows_examined: 优化程序检查的行数 写入慢查询日志文件的每个语句前面都有一个SET 语句,该语句包含一个时间戳,指示何时记录的慢语句(在语句完成执行后发生)。 Mysql慢查询日志是否...
# User@Host:root[root]@ localhost[]Id:8# Query_time:3.985637Lock_time:0.000138Rows_sent:165346Rows_examined:9900000Thread_id:8Errno:0Killed:0Bytes_received:0Bytes_sent:4848540Read_first:0Read_last:0Read_key:1Read_next:9900000Read_prev:0Read_rnd:0Read_rnd_next:0Sort_merge_passes:0Sort_ran...
query_time # SQL 语句的查询时间(在 MySQL 中所有类型的 SQL 语句执行的时间都叫做 query_time,而在 Oracle 中则仅指 select) lock_time: #锁的时间 rows_sent: #返回了多少行,如果做了聚合就不准确了 rows_examined: #执行这条 SQL 处理了多少行数据 SET timestamp #时间戳 通过这些我们就可以来明确的...
(平均返回记录数) at: average query time(平均查询时间) c: count(访问计数) l: lock time(锁定时间) r: rows sent(返回记录) t: query time(查询时间) -r reverse the sort order (largest last instead of first) -t NUM just show the top n queries(返回前面n条数据) -a don't abstract all...
# Query_time:1.573293Lock_time:0.000183Rows_sent:83Rows_examined:424614SETtimestamp=1412431847;selecttable_schema,table_name,count(*)fromtb_slow--这条SQL被记录下来了,其查询时间为1.573293sgroupbytable_schema,table_nameorderby3,2; root@localhost[tempdb]>showvariableslike'%log_queries_not_using_indexe...
query_time # SQL 语句的查询时间(在 MySQL 中所有类型的 SQL 语句执行的时间都叫做 query_time,而在 Oracle 中则仅指 select) lock_time: #锁的时间 rows_sent: #返回了多少行,如果做了聚合就不准确了 rows_examined: #执行这条 SQL 处理了多少行数据 ...
| Id | User | Host | db | Command | Time | State | Info | Time_ms | Rows_sent | Rows_examined | | 6 | event_scheduler | localhost | NULL | Daemon | 5019248 | Waiting on empty queue | NULL | 5019247326 | 0 | 0 |
除了上述变量,控制慢查询日志的还有一个系统变量:min_examined_row_limit。 这个变量的意思是,查询扫描过的最少记录数。这个变量和查询执行时间,共同组成了判别一个查询是否是慢查询的条件。如果查询扫描过的记录数大于等于这个变量的值,并且查询执行时间超过long_query_time的值,那么,这个查询就被记录到慢查询日志中...
# Time: 2022-12-14T15:01:34.892085Z# User@Host: root[root] @ localhost [] Id: 8# Query_time: 3.985637 Lock_time: 0.000138 Rows_sent: 165346 Rows_examined: 9900000 Thread_id: 8 Errno: 0 Killed: 0 Bytes_received: 0 Bytes_sent: 484854...
Query_time: *duration*语句执行时间,以秒为单位。 Lock_time: *duration*获取锁的时间(以秒为单位)。 Rows_sent: *N*发送给客户端的行数。 Rows_examined:*``*服务器层检查的行数(不计算存储引擎内部的任何处理)。 写入慢查询日志文件的每个语句之前都有一个SET包含时间戳的语句,该时间戳记指示慢速语句的...