MySQL standard query log input

When you direct MySQL to the General query log to the general_log table, it has an event_time column of type timestamp — which has a resolution of 1sec. Also there is no id auto-increment column.

If several log entries have the same time stamp (occur from the same second) - how can I find out their order?

(If you know a completely different approach to logging requests for their order, please share it as well)

+3
source share
1 answer

To summarize my comments and comments above:

  • Records of the general query (GQL) are recorded in the received order, which may differ from the order of their execution
  • Indeed, GQL has a resolution of only 1 sec.
  • MySQL binary log seems to be the only way to achieve better resolution.
0
source

Source: https://habr.com/ru/post/894822/


All Articles