In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
For some statistical problems, the overlay index is as follows:
MySQL > show create table test1\ gateway * 1. Row * * Table: test1Create Table: CREATE TABLE `test1` (`id` bigint (16) NOT NULL AUTO_INCREMENT, `order_ seq` bigint (16) NOT NULL, PRIMARY KEY (`id`), KEY `idx_ id` (`id`), KEY `idx_id_ ordseq` (`id`) `order_ seq`) ENGINE=InnoDB AUTO_INCREMENT=15002212 DEFAULT CHARSET=utf8mb41 row in set (0.00 sec) MySQL > explain select count (*) from test1 where id > 10000 and id 1502131212577 and order_seq
< 202007080947244761; test1表建有id和 order_seq 字段的联合索引。 MySQL >Show create table test1\ CREATE TABLE * 1. Row * * Table: test1Create Table: CREATE TABLE `test1` (`id` bigint (16) NOT NULL AUTO_INCREMENT, `order_ seq` bigint (16) NOT NULL, PRIMARY KEY (`id`), KEY `idx_ id` (`id`), KEY `idx_id_ ordseq` (`id`) `order_ seq`) ENGINE=InnoDB AUTO_INCREMENT=15002212 DEFAULT CHARSET=utf8mb41 row in set (0.00 sec) MySQL > explain select count (*) from test1 where order_seq > 15021312577 and order_seq < 202007080947244761 +-- + -+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | + +-- + | 1 | SIMPLE | test1 | NULL | index | NULL | Idx_id_ordseq | 16 | NULL | 15068082 | 11.11 | Using where Using index | +-+- -+-- + 1 row in set 1 warning (0.00 sec)
Conditional order_seq queries are used here, and federated indexes are generally not available, but the query in this case takes advantage of overriding index information. Possible_keys is still null, but key is the occurrence of Using index in idx_id_ordseq,extra, which is represented as an overlay index.
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.