The MySQL slow query log often shows a bunch of following entries in sequence.
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
...
Usually 6-7 "commit" queries in sequence. Anyone what they are and what's the preceding query of each of them?
Thanks in advance.
the set timestamp
command affects the value returned by now
and the value that auto timestamp columns receive when their rows are modified.
this is necessary for replication and when playing back the log. query semantics that depend on the current time will always match exactly. (note sysdate
disregards set timestamp
unlike now
)
the log will make sure the timestamp is recorded with set timestamp
whenever there's a new connection, a mysql ping, or any statement executed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With