In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
slow query log How to query slow query statements, I believe that many inexperienced people are helpless about this, this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
slow query log
Slow query log, by setting the relevant slow query parameters, you can output slow sql statements to the log, which is the slow query log. In many cases, considering the performance problem, the slow query log is not opened, that is, the output of the slow query log is not performed. Maybe sometimes in order to find slow query statements, it will be temporarily opened. This is a way to find inefficient sql. Let's take a look at the parameters.
>show variables like '%slow%';
www.2cto.com
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| log_slow_queries | OFF |
| slow_launch_time | 2 |
www.2cto.com
+------------------+-------+
2 rows in set (0.00 sec)
log_slow_queries is turned off by default, and turned on when set to on, with slow query log output. Slow_launch_time Sets the slow query criteria and defines the time value. The minimum setting is 1 second. If the query time exceeds this value, it will be output to the log. To find a sub-second slow query criterion, you can use the microslow-patch provided by percona to break the limit and reduce the slow query time to milliseconds.
After reading the above content, do you know how to query slow query log? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.