In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "Why the mysql optimizer chose the clustered index". Many people will encounter this dilemma in the operation of the actual case, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The following case is used to illustrate the trade-off of the optimizer when choosing an index.
View the table structure:
MySQL > show create table test2\ gateway * 1. Row * * Table: test2Create Table: CREATE TABLE `test2` (`id`bigint (16) NOT NULL AUTO_INCREMENT, `order_ seq` bigint (16) NOT NULL, `order_ type` int (11) DEFAULT NULL, `order_ types` int (11) DEFAULT NULL, PRIMARY KEY (`id`) KEY `idx_ id` (`id`), KEY `idx_id_ orderseq` (`id`, `order_ seq`) ENGINE=InnoDB AUTO_INCREMENT=15002212 DEFAULT CHARSET=utf8mb41 row in set (0.00 sec)
Enquiry 1:
MySQL > explain select id,order_seq from test2 where id > 10000 and id explain select * from test2 where id > 10000 and id
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.