In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Sort by execution time and use reverse order to find the slow query SQL of TOP 10
T_slow.sql
Use mysql
Select * from
(select * from slow_log where start_time > = '2016-08-01 00 order by query_time desc 01' order by query_time desc) a
Limit 10
Mysql-u root-p-e "source t_slow.sql" > t_slow.txt
Sort by lock time in reverse order to find the slow query SQL of TOP 10
L_slow.sql
Use mysql
Select * from
(select * from slow_log where start_time > = '2016-08-01 00 order by lock_time desc 01' order by lock_time desc) a
Limit 10
Mysql-u root-p-e "source l_slow.sql" > l_slow.txt
Sort by the number of rows output to find the slow query SQL of TOP 10 in reverse order
R_slow.sql
Use mysql
Select * from
(select * from slow_log where start_time > = '2016-08-01 00 order by rows_sent desc 01' order by rows_sent desc) a
Limit 10
Mysql-u root-p-e "source r_slow.sql" > r_slow.txt
Sort the slow query SQL of TOP 10 in reverse order according to the number of execution.
C_slow.sql
Use mysql
Select * from
(select sum (query_time), avg (query_time), sum (lock_time), avg (lock_time)
Sum (rows_sent), avg (rows_sent), sum (rows_examined), avg (rows_examined)
Count (1), sql_text from slow_log where start_time > = '2016-08-01 0015 01'
Group by sql_text order by count (1) desc) a
Limit 10
Mysql-u root-p-e "source c_slow.sql" > c_slow.txt
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.