Slow query statement for slowquerylog query _ MySQL
Source: Internet
Author: User
Slowquerylog slow query statement bitsCN.com
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 % '; + ------------------ + ------- + | Variable_name | Value | + ------------------ + ------- + | bytes | OFF | average | 2 | + ------------------ + ------- + 2 rows in set (0.00 sec) log_slow _ Queries is disabled by default. if it is set to on, it is enabled, with slow query log output. 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_pubitsCN.com
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.