The slow query log is enabled in mysql, but I often see such a query in the log. I don’t know what it means. In addition, my current query is not recorded in the slow query, but a lot of records are recorded. Logs like show status.
The meaning of the following log:
# Time: 2017-06-27T02:36:23.208000Z
# User@Host: root[root] @ localhost [127.0.0.1] Id: 3
# Query_time: 0.001000 Lock_time: 0.000000 Rows_sent: 6 Rows_examined: 305
SET timestamp=1498530983;
SELECT STATE AS `Status`, ROUND(SUM(DURATION),7) AS `Duration`, CONCAT(ROUND(SUM(DURATION)/0.000132*100,3), '%') AS `Percentage` FROM INFORMATION_SCHEMA.PROFILING WHERE QUERY_ID=31 GROUP BY STATE;
Why is there such a record, what is its meaning, and it appears irregularly!
女神的闺蜜爱上我2017-06-28 09:25:21
First of all, slow query will only record your query statements that take longer than the query time you set. In addition, your statement uses ROUND random values and groub by. The query is definitely slow, so it will be recorded in the log. It is recommended Don’t put this kind of logical processing in mysql
黄舟2017-06-28 09:25:21
Is your slow query time too short? Record in 1ms! This sql is used by the system to generate execution plan statistics