Speeding up inner joins between a large table and a small table

Posted by Zaid on Stack Overflow See other posts from Stack Overflow or by Zaid
Published on 2010-02-13T08:46:26Z Indexed on 2010/05/24 11:21 UTC
Read the original article Hit count: 273

Filed under:
|

This may be a silly question, but it may shed some light on how joins work internally.

Let's say I have a large table L and a small table S (100K rows vs. 100 rows).

Would there be any difference in terms of speed between the following two options?:

OPTION 1:                 OPTION 2:
---------                 ---------
SELECT *                  SELECT *
FROM L INNER JOIN S       FROM S INNER JOIN L
ON L.id = S.id;           ON L.id = S.id;

Notice that the only difference is the order in which the tables are joined.

I realize performance may vary between different SQL languages. If so, how would MySQL compare to Access?

© Stack Overflow or respective owner

Related posts about sql

Related posts about query-optimization