In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail what are the strange events about mysql slow query. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
Open the mysql slow query log and find that many sql queries take a very short time. Obviously, sql of less than 0.01s is also included in the slow log query. The log details are as follows:
# User@Host: otterpro [otterpro] @ [172.22.53.122] Id: 2061
# Schema: otter Last_errno: 0 Killed: 0
# Query_time: 0.000559 Lock_time: 0.000080 Rows_sent: 3 Rows_examined: 327 Rows_affected: 0
# Bytes_sent: 755
SET timestamp=1512715920
Select ID,NODE_ID,PIPELINE_ID,LOCATION,GMT_CREATE,GMT_MODIFIED from PIPELINE_NODE_RELATION where NODE_ID = 74 ORDER BY ID DESC
# Time: 171208 14:52:08
# User@Host: otterpro [otterpro] @ [172.22.53.122] Id: 2061
# Schema: otter Last_errno: 0 Killed: 0
# Query_time: 0.000214 Lock_time: 0.000110 Rows_sent: 2 Rows_examined: 2 Rows_affected: 0
# Bytes_sent: 821
SET timestamp=1512715928
Select ID,CLUSTER_NAME,SERVER_LIST,DESCRIPTION,GMT_CREATE,GMT_MODIFIED from AUTOKEEPER_CLUSTER ORDER BY ID ASC
A little skeptical. Check the parameters again:
Mysql > show global status like'% slow_queries%'
+-+ +
| | Variable_name | Value |
+-+ +
| | Slow_queries | 6055683 | |
+-+ +
Mysql > show variables like'% slow_query_log%'
+-+
| | Variable_name | Value |
+-+
| | slow_query_log | ON |
| | slow_query_log_always_write_time | 10.000000 | |
| | slow_query_log_file | / data/mysql/13306/tmp/slow.log |
| | slow_query_log_timestamp_always | OFF |
| | slow_query_log_timestamp_precision | second |
| | slow_query_log_use_global_control |
+-+
6 rows in set (0.01 sec)
Mysql > show variables like 'long_query_time'
+-+ +
| | Variable_name | Value |
+-+ +
| | long_query_time | 0.100000 | |
+-+ +
1 row in set (0.00 sec)
Mysql > show global variables like'% general%'
+-- +
| | Variable_name | Value |
+-- +
| | general_log | OFF |
| | general_log_file | / data/mysql/13306/tmp/file.sql |
+-- +
2 rows in set (0.00 sec)
Log-queries-not-using-indexes
If you run a SQL statement that does not use an index, the mysql database also logs the SQL statement to the slow query log file.
This is the end of this article on "what are the strange events of mysql slow query". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.