Forum OpenACS Q&A: Response to Outer join Query for Users_files: Help

Collapse
Posted by Todd Gillespie on
Dan: the case-with-subselect is faster than the "outer join with projected view with group by" because the 'CASE WHEN EXISTS' need only find the first row, at which point it stops executing. (faster to pronounce, too). The outer join scans the entirety of the relevant subset of the table, groups it, and only then verifies existence. This may already be obvious to you by this point, in which case I'm speaking to the silent audience.

As for stopping while you're ahead... better to stop when you're correct.