MySQL Forums
Forum List  »  Performance

Re: What does timestamp repeating in slow query log mean?
Posted by: Rick James
Date: January 31, 2014 04:52PM

Same TIMESTAMP --> the queries started in the same second.

If you are looking in the slowlog, it is even possible for the timestamps to go backwards. This happens when a longer query starts first, but ends second. The slowlog entry is not made until the query finishes, but it is labeled with the starting timestamp.

TRUNCATE -- Which ENGINE? What is the value of innodb_file_per_table?

Consider the following instead of TRUNCATE:
CREATE TABLE new (...);
INSERT INTO new ...;
RENAME TABLE real TO old, new TO real;
DROP TABLE old.

To keep new TRUNCATE from starting before the old cycle finished:
SELECT GET_LOCK('truncator', ...); -- and abort if it times out without getting the 'lock'.
TRUNCATE, etc
RELEASE LOCK('truncator');

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: What does timestamp repeating in slow query log mean?
1577
January 31, 2014 04:52PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.