What is the meaning of MySQL's return table query?

In the query back to the table in

MySQL, my understanding is that the secondary index cannot directly query the data of all columns, so after querying the clustered index through the secondary index, and then querying the desired data, this process of querying through the secondary index is called back to the table.
is this understood correctly?

if explain looks at the execution plan and sees Using where in Extra, does it mean that the data was queried by returning the table?

Apr.21,2022

the general meaning is right, but it is not accurate.

1. I understand that there is no process of "querying to a clustered index through a secondary index". The primary key of the table is stored in the secondary index (if there is no primary key mysql will automatically generate a rowid), and returning to the table refers to querying a row of the table through the primary key.

2. Using where is seen in Extra, which means that it is filtered according to the where condition, which has nothing to do with whether or not to go to the index and return to the table.
queries the data on behalf of the table only if the index is used and Extra is Using where.
there is another case, using index & using where in Extra, which means that the data of select can be found in the index, but needs to be filtered according to the where condition, which does not return to the table.


for
, but either using where appears or returns to the table. Using where just filters
if using index condition appears, the secondary index returns to the table


. It sums up very well

.
Menu