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)05/31 Report--
This article mainly explains "what is the MySQL SQL optimization method". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn what the MySQL SQL optimization method is.
A sql was found in slowlog for more than 10 seconds.
# Time: 2017-03-02T18:41:50.201376+08:00
# User@Host: oms_ readonly[ oms _ readonly] @ [10.xx.xx.xx] Id: 54124620
# Query_time: 11.005894 Lock_time: 0.000223 Rows_sent: 20 Rows_examined: 1838114
SET timestamp=1488451310
Select * from customers where `type` = 1 AND `status`
< 7 AND `isarea` = 6 AND `into_time`>= '2016-12-01'AND `into_ time` explain select * from customers where `type` = 1 AND `status`
< 7 AND `isarea` = 6 AND `into_time`>= '2016-12-01'AND `into_ time` select count (*) from customers where `type` = 1
+-+
| | count (*) |
+-+
| | 2373175 |
+-+
1 row in set (1.53 sec)
Mysql > select count (*) from customers where `status`
< 7; ->+-+
| | count (*) |
+-+
| | 2494232 |
+-+
1 row in set (3.16 sec)
Mysql > select count (*) from customers where `isarea` = 6
+-+
| | count (*) |
+-+
| | 135347 |
+-+
1 row in set (0.15 sec)
Mysql > select count (*) from customers where `into_ time` > = '2016-12-01'AND `into_ time` explain select * from customers use index (isarea) where `type` = 1 AND `status`
< 7 AND `isarea` = 6 AND `into_time`>= '2016-12-01'AND `into_ time`
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.