CREATE TABLE t (id INT, a INT, b INT, KEY (a), KEY (b)) ENGINE=INNODB PARTITION BY HASH (id) PARTITIONS 10; insert into t values (0,4,1); insert into t values (6,2,5); insert into t values (6,7,5); insert into t values (2,4,6); insert into t values (3,5,6); insert into t values (1,3,9); insert into t values (1,3,9); insert into t values (3,4,6); insert into t values (4,4,6); EXPLAIN SELECT SQL_NO_CACHE COUNT(*) FROM t WHERE a=4 AND b=6; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t index_merge a,b a,b 5,5 NULL 7 Using intersect(a,b); Using where; Using index EXPLAIN SELECT SQL_NO_CACHE a,b FROM t WHERE a=4 AND b=6; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t index_merge a,b a,b 5,5 NULL 7 Using intersect(a,b); Using where; Using index SELECT SQL_NO_CACHE * FROM t WHERE a=4 AND b=6 ORDER BY id; id a b 2 4 6 3 4 6 4 4 6 SELECT SQL_NO_CACHE COUNT(*) FROM t WHERE a=4 AND b=6; COUNT(*) 3 DROP TABLE t;