2021-03-08, 11:44 AM (ISO 8601)
Re: SQL: RIGHT or LEFT JOIN more efficient
Originally Posted by factotum
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.