2 ms·
Maybe someday SQL will let us do ANTI JOIN A man can dream
by paulddraper 3y ago
Maybe someday SQL will let us do ANTI JOIN
A man can dream
- aidos 3y agoI always enjoy how the planner explicitly calls it an anti join but for those unfamiliar with the tricks the sql looks pretty weird on first glance. Traditionally I’ve always done it as left join null but I saw a case a while back where the not exists version performed better (Postgres). I feel like I must have missed something because I thought they optimised to the same thing (maybe there were other criteria in the subquery that allowed it to use a better index).