Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

My slow query log is full of entries like the following:

# Query_time: 1.016361  Lock_time: 0.000000 Rows_sent: 0  Rows_examined: 0
SET timestamp=1273826821;
COMMIT;

I guess the set timestamp command is issued by replication but I don't understand how set timestamp can take over a second. Any ideas of how to fix this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
912 views
Welcome To Ask or Share your Answers For Others

1 Answer

Timestamp is a data type and a built-in function in MySQL. What are you trying to achive with the following statement?

SET timestamp=1273826821;

UPD: I am sorry, I didn't know about the used MySQL hacks.

It seems that SET TIMESTAMP is used as a solution to exclude some queries from the slow log.

The OP is using the Microslow patch to enhance stat info in the slow query log, and the statement is common before statements on InnoDB tables.

Thus, the answer to OP's question is that the COMMIT statement is the slow query and not the SET TIMESTAMP.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...