Multiple Left Joins
Posted: Wed Mar 22, 2006 7:56 am
Please tell me if I am doing this query correctly. I am getting out of memory errors from MySQL ERROR: 28. I am selecting data based on criteria from a primary table which is large, and just obtaining misc data from the other small tables.
1. Does it matter what order I join them in? (ie is SmallTableOne.Record = LargeTable.Record the same as LargeTable.Record = SmallTableOne.Record?)
2. Is this the correct Join to use?
EDIT, I changed the join type from LEFT JOIN to JOIN and I no longer get the out of memory error. Comments still appreciated though.
1. Does it matter what order I join them in? (ie is SmallTableOne.Record = LargeTable.Record the same as LargeTable.Record = SmallTableOne.Record?)
2. Is this the correct Join to use?
Code: Select all
FROM `LargeTable`
LEFT JOIN (
`SmallTableOne` , `SmallTableTwo` , `SmallTableThree`
) ON (
SmallTableOne.Record = LargeTable.Record
AND SmallTableTwo.Record = LargeTable.Record
AND SmallTableThree.Record = LargeTable.Record )