Page 1 of 1

Join samll table with Big table

Posted: Mon Jan 13, 2014 6:45 am
by krishstj
What happens when left table [ outer table ] is smaller when compared to right table [ inner table ] in joins.. [ outer and inner joins ]
will it affect the performance.

Re: Join samll table with Big table

Posted: Mon Jan 13, 2014 9:55 am
by id10t
Hi!

[DELETED]

Re: Join samll table with Big table

Posted: Thu Jan 16, 2014 10:04 pm
by NorbertKrupa
I don't believe that explicitly using a LIMIT improves the query performance (other than data transferred) as the optimizer must still perform the join on both tables. What I would suggest is to try to narrow your big table before the join;

Code: Select all

SELECT ...
FROM small_table
JOIN (SELECT ... FROM big_table WHERE some_column = 5 AND date > somedate)