MySQL慢查询日志通常按顺序显示一堆以下条目。
SET timestamp=1268999330;
commit;
# User@Host: username[username] @ localhost []
# Query_time: 4.172700 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
SET timestamp=1268999330;
commit;
# User@Host: username[username] @ localhost []
# Query_time: 3.628924 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
SET timestamp=1268999330;
commit;
# User@Host: username[username] @ localhost []
# Query_time: 3.116018 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
...通常按顺序执行6-7个“提交”查询。有没有人知道他们是什么,他们每个人前面的问题是什么?
提前谢谢。
发布于 2010-03-20 15:35:46
set timestamp命令会影响now返回的值以及修改自动时间戳列的行时接收的值。
这对于复制和回放日志是必需的。依赖于当前时间的查询语义将始终精确匹配。(请注意,与now不同,sysdate忽略了set timestamp )
每当有新的连接、mysql ping或执行任何语句时,日志都会确保使用set timestamp记录时间戳。
https://stackoverflow.com/questions/2482242
复制相似问题