1) Make sure you have your indexes setup properly (on the columns you are joining them on).
2) You could also try using a temporary table.
Some more tips
here[
^].
If you search on the internet, you should be able to find other tips / articles which can help you optimize your query.