zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

2022-11-14 mysql-loose scan

mysql 2022 11 14 scan
2023-09-27 14:25:42 时间

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 of the keys in an index, so it is called a Loose Index Scan. When there is no WHERE clause, a Loose Index Scan reads as many keys as the number of groups, which may be a much smaller number than that of