current position:Home>Will MySQL's non clustered indexes be queried back to the table?

Will MySQL's non clustered indexes be queried back to the table?

2022-02-04 16:52:53 Alibaba cloud Q & A

MySQL Does the non clustered index of the must be queried back to the table ?




Take the answer 1:

not always , If all the fields of the query statement hit the index , Then you don't have to query the return table ( ha-ha , That's what overlay indexing is all about ).

A simple example , Suppose we build an index on the student table , So when it comes to select age from student where age < 20 When it comes to , On the leaf node of the index , Already included age Information , It will not query back to the table again .


copyright notice
author[Alibaba cloud Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/02/202202041652494591.html

Random recommended