What does MySQL do internally when you perform a LEFT JOIN?

Let's say you have two tables:
Table A has 1,000,000 rows
Table B has 5,000 rows

When you perform the following LEFT JOIN:
Select A.*, B.*
FROM A, B
WHERE
A.lastname = 'doe' AND A.id <http://A.id> = B.id <http://B.id>

What does MySQL do internally?
Does it first create some sort of CROSS JOIN with the two tables (resulting 
in a 5,000,000,000 row table)
and then finding the matching rows based on the WHERE clause?

-James

Reply via email to