开发者

MySQL general query log entry order

开发者 https://www.devze.com 2023-03-27 15:27 出处:网络
When directing MySQL\'s General Query Log to a general_log table, it has an event_time column of type timestamp - which has a resolution of 1sec. Also there is no auto-increment id column.

When directing MySQL's General Query Log to a general_log table, it has an event_time column of type timestamp - which has a resolution of 1sec. Also there is no auto-increment id column.

If multiple log entries have the same timestamp (occur on same second) 开发者_运维问答- how can I know their order?

(If you know of a completely different approach to logging the queries by their order, please do share as well)


Summing up my understandings and the comments above:

  • General Query Log (GQL) entries are written in the order received, which might differ from the order in which they are executed
  • Indeed GQL has a resolution of only 1sec
  • MySQL's binary log seems the only way to get better resolution
0

精彩评论

暂无评论...
验证码 换一张
取 消