mysql慢查询单位,MySQL的慢查询日志中的时间单位是什么?

I'm looking at the slow query log from a drupal-based webapp, and have lines that look like this:

# Query_time: 3257 Lock_time: 0 Rows_sent: 272 Rows_examined: 272

# Query_time: 1654 Lock_time: 0 Rows_sent: 222 Rows_examined: 222

# Query_time: 3292 Lock_time: 0 Rows_sent: 269 Rows_examined: 269

# Query_time: 1029 Lock_time: 0 Rows_sent: 172 Rows_examined: 172

# Query_time: 2126 Lock_time: 0 Rows_sent: 251 Rows_examined: 251

# Query_time: 1731 Lock_time: 0 Rows_sent: 229 Rows_examined: 229

Are these times indicating that the associated queries took between 1 and 3+ seconds (slow but not terrible) to execute, or between 1,000 and 3,000+ seconds (completely unacceptable)? I understand that the long_query_time option is specified in seconds, but do the log messages follow this same convention, or do they use milliseconds instead?

Edit: this is with MySQL version 5.0.45.

解决方案

It's in seconds. The 'resolution of microseconds' means, that you can have up to microsecond precision after a decimal (although AFAIK it need a patch to actually write with such precision)

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值