mys​qldumpslow求解

来源:-

慕粉18312537527

2016-05-30 15:58

老师,请问一下,我执行mysqldumpslow -s t -t 10 /var/localhost-slow.log时,怎么显示出来的结果中,Time,Lock,Rows的值都是0.0,已经确认sql是能查到数据的。到底什么情况?

写回答 关注

1回答

  • 慕粉18312537527
    2016-05-30 17:03:10

    例如,查询结果是这样的:

    Count: 1  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=0.0 (0), root[root]@localhost
      # Schema: test  Last_errno: N  Killed: N
      # Query_time: N.N  Lock_time: N.N  Rows_sent: N  Rows_examined: N  Rows_affected: N
      # Bytes_sent: N
      use test;
      SET timestamp=N;
      set global slow_query_log = on

    Count: 1  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=0.0 (0), root[root]@localhost
      # Schema:   Last_errno: N  Killed: N
      # Query_time: N.N  Lock_time: N.N  Rows_sent: N  Rows_examined: N  Rows_affected: N
      # Bytes_sent: N
      SET timestamp=N;
      select sleep(N)

    Count: 1  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=0.0 (0), root[root]@localhost
      # Schema: test  Last_errno: N  Killed: N
      # Query_time: N.N  Lock_time: N.N  Rows_sent: N  Rows_examined: N  Rows_affected: N
      # Bytes_sent: N
      SET timestamp=N;
      select * from test100w where id > (select id from test100w where id = N) limit N

性能优化之MySQL优化

了解MySQL数据库优化的方法和技巧,在课程中共同探讨一起学习吧

101743 学习 · 234 问题

查看课程

相似问题