3 ms·
I'm surprised nobody else has mentioned this yet - a LEFT JOIN can be more efficient than an INNER JOIN precisely because the database doesn't need to enforce t
by zeroimpl 5y ago
I'm surprised nobody else has mentioned this yet - a LEFT JOIN can be more efficient than an INNER JOIN precisely because the database doesn't need to enforce the filter during the query plan.
This comes up for me most often with views, when a query referencing the view doesn't end up using all the columns - when a LEFT JOIN is used, the database can potentially skip querying those tables entirely, but not with an INNER JOIN.