EXPLAIN ANALYZE: -> Limit: 10 row(s) (cost=497474 rows=10) (actual time=0.179..0.3 rows=10 loops=1) -> Nested loop left join (cost=497474 rows=10) (actual time=0.178..0.296 rows=10 loops=1) -> Nested loop left join (cost=248737 rows=10) (actual time=0.144..0.239 rows=10 loops=1) -> Index scan on test_client using PRIMARY (cost=0.0131 rows=10) (actual time=0.0782..0.148 rows=10 loops=1) -> Index lookup on test_join1 using client_id (client_id=test_client.id) (cost=0.25 rows=1) (actual time=0.00824..0.00824 rows=0 loops=10) -> Index lookup on test_join2 using client_id (client_id=test_client.id) (cost=0.25 rows=1) (actual time=0.0048..0.0048 rows=0 loops=10) EXPLAIN: +--+-----------+-----------+----------+-----+-------------+---------+-------+----------------------------+----+--------+-----+ |id|select_type|table |partitions|type |possible_keys|key |key_len|ref |rows|filtered|Extra| +--+-----------+-----------+----------+-----+-------------+---------+-------+----------------------------+----+--------+-----+ |1 |SIMPLE |test_client|null |index|null |PRIMARY |4 |null |10 |100 |null | |1 |SIMPLE |test_join1 |null |ref |client_id |client_id|5 |hashjoinissue.test_client.id|1 |100 |null | |1 |SIMPLE |test_join2 |null |ref |client_id |client_id|5 |hashjoinissue.test_client.id|1 |100 |null | +--+-----------+-----------+----------+-----+-------------+---------+-------+----------------------------+----+--------+-----+