mysql> drop table if exists `t1`; Query OK, 0 rows affected (0.00 sec) mysql> create table `t1`(`c` int)engine=myisam; Query OK, 0 rows affected (0.02 sec) mysql> insert into `t1` values (),(); Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> drop table if exists `t2`; Query OK, 0 rows affected (0.00 sec) mysql> create table `t2` ( -> `b` int, -> key(`b`),key(`b`),key(`b`),key(`b`),key(`b`), -> key(`b`),key(`b`),key(`b`),key(`b`),key(`b`), -> key(`b`),key(`b`),key(`b`),key(`b`),key(`b`), -> key(`b`),key(`b`),key(`b`),key(`b`),key(`b`), -> key(`b`),key(`b`),key(`b`),key(`b`),key(`b`), -> key(`b`),key(`b`),key(`b`),key(`b`),key(`b`), -> key(`b`),key(`b`),key(`b`))engine=myisam; Query OK, 0 rows affected (0.01 sec) mysql> mysql> insert into `t2` values (),(),(); Query OK, 3 rows affected (0.00 sec) Records: 3 Duplicates: 0 Warnings: 0 mysql> mysql> explain -> select 1 -> from -> (select 1 from `t2`,`t1` where `b` < `c` group by 1 limit 1) as `d2` -> ; +----+-------------+------------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+------+---------+------+------+--------------------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+------------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+------+---------+------+------+--------------------------------------------------------+ | 1 | PRIMARY | | system | NULL | NULL | NULL | NULL | 0 | const row not found | | 2 | DERIVED | t1 | ALL | NULL | NULL | NULL | NULL | 2 | | | 2 | DERIVED | t2 | range | b,b_2,b_3,b_4,b_5,b_6,b_7,b_8,b_9,b_10,b_11,b_12,b_13,b_14,b_15,b_16,b_17,b_18,b_19,b_20,b_21,b_22,b_23,b_24,b_25,b_26,b_27,b_28,b_29,b_30,b_31,b_32,b_33 | b | 5 | NULL | 0 | Range checked for each record (index map: 0x1FFFFFFFF) | +----+-------------+------------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+------+---------+------+------+--------------------------------------------------------+ 3 rows in set (0.00 sec) mysql> mysql>