log_slow_extra输出的额外字段

启用log_slow_extra系统变量(从MySQL 8.0.14开始可用)会导致服务器将以下额外字段写入文件输出(不影响表输出)。一些字段描述引用状态变量名。有关更多信息,请参阅状态变量描述。但是,在慢速查询日志中,计数器是每个语句的值,而不是每个会话的累积值。
Thread_id: ID

The statement thread identifier.

Errno: error_number

The statement error number, or 0 if no error occurred.

Killed: N

If the statement was terminated, the error number indicating why, or 0 if the statement terminated normally.

Bytes_received: N

The Bytes_received value for the statement.

Bytes_sent: N

The Bytes_sent value for the statement.

Read_first: N

The Handler_read_first value for the statement.

Read_last: N

The Handler_read_last value for the statement.

Read_key: N

The Handler_read_key value for the statement.

Read_next: N

The Handler_read_next value for the statement.

Read_prev: N

The Handler_read_prev value for the statement.

Read_rnd: N

The Handler_read_rnd value for the statement.

Read_rnd_next: N

The Handler_read_rnd_next value for the statement.

Sort_merge_passes: N

The Sort_merge_passes value for the statement.

Sort_range_count: N

The Sort_range value for the statement.

Sort_rows: N

The Sort_rows value for the statement.

Sort_scan_count: N

The Sort_scan value for the statement.

Created_tmp_disk_tables: N

The Created_tmp_disk_tables value for the statement.

Created_tmp_tables: N

The Created_tmp_tables value for the statement.

Start: timestamp

The statement execution start time.

End: timestamp

The statement execution end time.
给定的慢速查询日志文件可能包含通过启用log_slow_extra而添加或不添加额外字段的行组合。日志文件分析器可以通过字段计数确定一行中是否包含其他字段。

写入慢速查询日志文件的每个语句前面都有一个SET语句,其中包含一个时间戳。在MySQL 8.0.14中,时间戳表示慢语句开始执行的时间。在8.0.14之前,时间戳指示记录慢速语句的时间(发生在语句完成执行之后)。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值