MySQL general query log entry order
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
精彩评论