Slow query log Slow query statement slow query log Slow query log. By setting related slow query parameters, You can output Slow SQL statements of the database to the log. This is the slow query log, in many cases, due to performance issues, slow query logs are not opened, that is, the output of slow query logs is not performed. Sometimes, in order to find slow query statements, the log is temporarily opened, this is a way to find inefficient SQL statements. Let's take a look at the parameter mysql> show variables like '% slow % '; www.2cto.com + ---------------- + ------- + | Variable_name | Value | + ------------------ + ------- + | bytes | OFF | bytes | 2 | www.2cto.com + ---------------- + ------- + 2 rows In set (0.00 sec) log_slow_queries is disabled by default. If it is set to on, log_slow_queries is enabled and slow query log output is available. Slow_launch_time sets the slow query standard and defines the time value. The minimum value is 1 second. If the query time exceeds this value, it will be output to the log. To find the slow query standard below 1 second, you can use the microslow-patch provided by percona to break through the limit and reduce the slow query time to the millisecond level. Author: aeolus_pu