当前位置:网站首页>Back to table query of MySQL? How to avoid it?
Back to table query of MySQL? How to avoid it?
2022-06-10 22:12:00 【A little dog】
Mysql Back table query for ? How to avoid ?
Clustered and non-clustered indexes
Different cases of using index queries (1. Aggregate index 、2. Non aggregate index (2.1 Non primary key index 、2.2 In addition to non primary key indexes, they also contain non indexed fields ))
- Query by primary key : When our query criteria are through the primary key , Because the primary key is a clustered index , At this time, data can be obtained directly from the leaf node of the index ;
- When querying through a common index , There are two cases of scoring :
- select * from table where in xx =‘’ If the field of is just the index field , Then you can directly find the corresponding value in the index , Unwanted " Return to the table for query ", Direct return .
- select * from table where xx = ‘’ in xx If a field contains a field other than a normal index , Then the primary key information of the leaf node will be obtained through this record , After getting the primary key information, you can find the row information corresponding to the primary key in the aggregate index , This process is called back to table query .
What is return table query ?
With a normal index , And include non indexed fields , The primary key information of the leaf node will be obtained through the common index , After getting the primary key information, find the corresponding row information in the aggregate index , This process is called back to table query .

The actual operation of query back to the table

explain select name from test;I see here that it is simply used index.
explain select name from test where name='name1';Shows the order of execution Show through where Condition before use index.explain select * from test where name='name1';When these two items are executed, you can also see , The following statements will be found because they cannot be found through the index , Therefore, the query operation will be performed . get data .
Please correct me if there is any mistake
边栏推荐
- 【MySQL】表结构的增删查改操作(DDL)
- Install MySQL on Linux system. Problems encountered in xshell
- 【生成对抗网络学习 其一】经典GAN与其存在的问题和相关改进
- Self made table
- Only this is the most true reason why leaders promote you. The rest is nonsense!
- As a programmer, is it really that important for the underlying principles?
- Which city should I go to after I graduate from it? Which position has a high salary? Which companies have good treatment?
- ICML2022 | Sharp-MAML:锐度感知的模型无关元学习
- A WPF developed Print dialog box -printdialogx
- Business based precipitation component = & gt; manage-table
猜你喜欢

C language -- 4 first-time constant
![[qingniaochangping campus of Peking University] the coordinated development of vocational education and general education, will this year's high school entrance examination be easy?](/img/3a/1376593d02adf29a1c37d894dcc0fa.png)
[qingniaochangping campus of Peking University] the coordinated development of vocational education and general education, will this year's high school entrance examination be easy?

2022-06-09 RK817 PMU 电池温度检测

登堂入室之soc开发环境及硬件开发准备
![[1024 ways to play windows azure] 75 Fast cloud database migration seamlessly migrate alicloud RDS SQL server to azure SQL databas](/img/00/798455f2db289e3aaed36981ea1e7c.png)
[1024 ways to play windows azure] 75 Fast cloud database migration seamlessly migrate alicloud RDS SQL server to azure SQL databas
![[nk] Niuke monthly competition 51 f-average question](/img/b3/c36a0032e606f38fdc2f7c4562713c.png)
[nk] Niuke monthly competition 51 f-average question

Abbexa acrylamide peg NHS instructions

In 2021, the average salary will be released, and the IT industry will not be surprised
Detailed steps and actual records of SQL server2019 installation (available for hands-on test)

Introduction to ZigBee module wireless transmission star topology networking structure
随机推荐
Exec function of PHP
Ceph分布式存储集群Pool资源池的概念以及使用
C use s7 Net connected to Siemens s1200plc, C # directly connected to Siemens PLC
Before we learn about high-performance computing, let's take a look at its history
Summary of common mysql8 commands in centos7 environment
MySQL insère les résultats de la requête dans une autre table
OC swift hybrid
SQL Server row to column (pivot), column to row (unpivot)
Can I make up the exam if I fail the soft exam? Here comes the answer
The process of keyword search in Oracle tables
2022 - 06 - 09 rk817 PMU Battery Temperature Detection
Array rotate array
In 2021, the average salary will be released, and the IT industry will not be surprised
Notes to entry: do I need to know programming for O & M?
What do software test engineers do?
解读创客空间下的教育新生态
Introduction to abbexa bacterial genome DNA Kit
C语言qsort()函数的使用(详解)
SQL第四练:字符串处理函数
Detailed steps and actual records of SQL server2019 installation (available for hands-on test)