Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment t1 0 PRIMARY 1 a NULL NULL NULL NULL a b 2 2 3 3 4 4 a b 4 4 a b 2 2 3 3 4 6 a b 1 1 2 2 3 3 4 4 a 869751 802616 a 869751 802616 a 736494 a 736494 869751 a 226312 736494 802616 869751 table type possible_keys key key_len ref rows Extra t1 range uniq_id uniq_id 4 NULL 4 where used; Using index x y 1 3 1 1 x y x y 1 1 1 1 2 2 2 2 1 3 1 1 2 4 2 2 2 5 2 2 2 6 2 2 table type possible_keys key key_len ref rows Extra t1 ALL x NULL NULL NULL 6 t2 eq_ref y y 4 t1.x 1 max(a) 1 a b 1 6 1 5 1 4 1 3 1 2 1 1 a b 1 6 1 5 1 4 1 3 1 2 1 1 1 6 1 5 1 4 1 3 1 2 1 1 max(id) 1 max(id) 2 f1 f2 16 ted 12 ted 12 ted 12 ted 12 ted