Description:
According to our documentation the optimizer can decide under certain circumstances to use an optimization called loose index scan:
http://dev.mysql.com/doc/refman/5.1/en/loose-index-scan.html
This is NOT reported in the execution plan.
How to repeat:
create table t1 (c1 int, c2 int, c3 int, c4 int, index (c1, c2, c3)) engine Myisam;
insert into t1 values (1,1,1,1), (2,2,2,2), (3,3,3,3);
explain
SELECT MAX(c3), MIN(c3), c1, c2 FROM t1 WHERE c2 > 1 GROUP BY c1, c2;
+----+-------------+-------+-------+---------------+------+---------+------+------+----------+--------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+-------+-------+---------------+------+---------+------+------+----------+--------------------------+
| 1 | SIMPLE | t1 | index | NULL | c1 | 15 | NULL | 3 | 100.00 | Using where; Using index |
+----+-------------+-------+-------+---------------+------+---------+------+------+----------+--------------------------+
Suggested fix:
+------------------------------------------------+
| Extra |
+------------------------------------------------+
| Using where; Using index(c1, loose index scan) |
+------------------------------------------------+