Quote Originally Posted by factotum View Post
There's absolutely no reason why either should be any more efficient, because you can actually write the same statement using either--you just have to swap your table names around. There are far more sources of inefficiency in a SQL statement, especially when applied to a large data set.
Thanks.
I figured the issue was the "second pass through the data" to do a DISTINCT or the sorting via ORDER BY. Well, actually the log note said it was running out of memory while doing the sorting, so I'm pretty sure it's the ORDER BY. But I felt like asking.

I generally only do LEFT JOINs out of habit, but it seemed more intuitive to do RIGHT JOINs for this particular project, and just got me wondering.