0

I am using AWS RDS slow log querys on a mysql database. I have a lot of this in the log:

# Query_time: 0.613015  Lock_time: 0.000000 Rows_sent: 0  Rows_examined: 0
use XXXXXXX;
SET timestamp=1567605603;
commit;

Some like this:

# Query_time: 0.575397  Lock_time: 0.000000 Rows_sent: 0  Rows_examined: 0
SET timestamp=1567605603;
commit;

What this means? A transaction was open but without any DML operations?

Bruno Manzo
  • 353
  • 3
  • 15
  • https://stackoverflow.com/questions/2832912/how-can-set-timestamp-be-a-slow-query might be of help here. – aynber Sep 04 '19 at 14:18
  • Please post 100 lines before and 100 lines after your point of concern from your Slow Query Log and we will have a better idea what was going on with your instance and can point you to a reference that would tie to PID displayed on SHOW FULL PROCESSLIST; results, when available. 10 Seconds of a GENERAL LOG would be very enlightening. – Wilson Hauck Sep 04 '19 at 23:53

1 Answers1

1

We can't know from a single entry in the slow query log, but it's likely that this commit was the last statement run after some number of DML statements.

That is, each statement gets its own entry in the slow query log, including start transaction and commit.

Unfortunately, the entries in the slow query log don't have a transaction id, so we don't know which statements are part of the same transaction.

Bill Karwin
  • 538,548
  • 86
  • 673
  • 828