4 ms·
I 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. Traditiona
by aidos 3y ago
I 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).