meee — 2010-03-30T18:33:07-04:00 — #1
Is it almost always faster to use left join insted of using to have 2 queries? I need to display user (firstname, lastname, image and hobbies). First 3 data are from the same table, hobbies are in other table.
I presume that in this case left join is much better, am I right? And what is in generall a better choice?
kylewolfe — 2010-03-30T19:19:23-04:00 — #2
Well, I see no reason to not use a join in the query. Otherwise you'll have to mess with doing so in your php code, correct?
r937 — 2010-03-30T21:15:24-04:00 — #3
i can think of one scenario where the join is not advised... Minimize Bandwith in One-to-Many Joins
immerse — 2010-03-31T05:12:46-04:00 — #4
Wow, I never thought of using UNIONS like that. I'll have to scour that site to see if there are more handy tricks