MySQL 5.5.32 Explain: +----+-------------+-------+--------+------------------------------------------+------------+---------+----------------------------------+------+---------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+--------+------------------------------------------+------------+---------+----------------------------------+------+---------------------------------+ | 1 | SIMPLE | cc | ref | cuisine_id,cat_id | cuisine_id | 4 | const | 213 | Using temporary; Using filesort | | 1 | SIMPLE | c | eq_ref | PRIMARY,delivery_id | PRIMARY | 8 | delivera_deliveras.cc.cat_id | 1 | Using where | | 1 | SIMPLE | p | ref | PRIMARY,cat_id | cat_id | 5 | delivera_deliveras.c.id | 3 | Using where; Using index | | 1 | SIMPLE | s | ref | product_id,account_id | product_id | 5 | delivera_deliveras.p.id | 4 | Using where | | 1 | SIMPLE | a | eq_ref | PRIMARY,delivery_id,delivery_type,active | PRIMARY | 8 | delivera_deliveras.s.account_id | 1 | Using where | | 1 | SIMPLE | d | eq_ref | PRIMARY,active | PRIMARY | 8 | delivera_deliveras.a.delivery_id | 1 | Using where | | 1 | SIMPLE | re | ref | account_id,active,approved | account_id | 4 | delivera_deliveras.a.id | 1 | | | 1 | SIMPLE | ts | ref | account_id,day | account_id | 4 | delivera_deliveras.a.id | 2 | Using where | | 1 | SIMPLE | cu | ALL | PRIMARY | NULL | NULL | NULL | 34 | Using where; Using join buffer | +----+-------------+-------+--------+------------------------------------------+------------+---------+----------------------------------+------+---------------------------------+ Percona 5.6.14 Explain: +----+-------------+-------+--------+--------------------------------------------------+------------+---------+-------------------------+------+------------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+--------+--------------------------------------------------+------------+---------+-------------------------+------+------------------------------------------------+ | 1 | SIMPLE | cc | ref | cuisine_id,cat_id | cuisine_id | 4 | const | 213 | Using temporary; Using filesort | | 1 | SIMPLE | c | eq_ref | PRIMARY,delivery_id | PRIMARY | 8 | perconadb.cc.cat_id | 1 | Using where | | 1 | SIMPLE | p | ref | PRIMARY,cat_id | cat_id | 5 | perconadb.c.id | 3 | Using where; Using index | | 1 | SIMPLE | s | ref | product_id,account_id | product_id | 5 | perconadb.p.id | 2 | Using where | | 1 | SIMPLE | a | eq_ref | PRIMARY,delivery_id,delivery_type,invoice,active | PRIMARY | 8 | perconadb.s.account_id | 1 | Using where | | 1 | SIMPLE | re | ref | account_id,active,approved | account_id | 4 | perconadb.a.id | 1 | Using where | | 1 | SIMPLE | d | eq_ref | PRIMARY,active | PRIMARY | 8 | perconadb.a.delivery_id | 1 | Using where | | 1 | SIMPLE | ts | ref | account_id,day | account_id | 4 | perconadb.a.id | 3 | Using index condition; Using where | | 1 | SIMPLE | cu | ALL | PRIMARY | NULL | NULL | NULL | 32 | Range checked for each record (index map: 0x1) | +----+-------------+-------+--------+--------------------------------------------------+------------+---------+-------------------------+------+------------------------------------------------+