最近看好多關於mysql的blog在講鬆散掃描的時候,提到了explain後,extra會顯示Loose Index Scan
,但是在5.6.34等版本中,會顯示Using index for group-by
,通過查找官方資料發現兩者沒什麼區別。下面引自官方文檔:https://dev.mysql.com/doc/refman/8.0/en/group-by-optimization.html
If Loose Index Scan is applicable to a query, the EXPLAIN output shows Using index for group-by in the Extra column.