November 2024
M T W T F S S
« Jul    
 123
45678910
11121314151617
18192021222324
252627282930  

Loose index scan vs. covered indexes in MySQL

Loose index scan in MySQL can really help optimizing “group by” queries in some cases (for example, if you have only min() and/or max() as your aggregate functions). For example, if you have this query (to find maximum delay for all US flights with departure on Sundays in 2010):

select max(DepDelayMinutes), carrier, dayofweek from ontime_2010 […]