In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
To get the execution plan information that the specified thread is executing SQL, you can use the following statement
When it takes a long time for a thread to execute SQL, you can use this statement to find the execution plan that is executing a large SQL, which is useful in performance diagnosis.
Mysql > show processlist
+-+ +
| | Id | User | Host | db | Command | Time | State | Info |
+-+ +
| | 17 | root | localhost | NULL | Query | 0 | starting | show processlist | |
| | 18 | neo | localhost | fire | Query | 257 | Sending data | select count (*) from T1 join T2 on t1.a=t2.a |
+-+ +
2 rows in set (0.00 sec)
Mysql > EXPLAIN FOR CONNECTION 18
+- -+
| | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+- -+
| | 1 | SIMPLE | T1 | NULL | index | idx_t1_a | idx_t1_a | 5 | NULL | 392945 | 100.00 | Using where; Using index |
| | 1 | SIMPLE | T2 | NULL | ref | idx_t2_a | idx_t2_a | 5 | fire.t1.a | 1 | 100.00 | Using index |
+- -+
2 rows in set (0.00 sec)
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.