In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 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.
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.