MySQL :: MySQL 5.7 Reference Manual :: 8.2.1.15 GROUP BY Optimization
manual:
Loose Index Scan
The most efficient way to process GROUP BY
is when an index is used to directly retrieve the grouping columns. With this access method, MySQL uses the property of some index types that the keys are ordered (for example, BTREE
). This property enables use of lookup groups in an index without having to consider all keys in the index that satisfy all WHERE
conditions. This access method considers only a fraction o