Hacker News new | past | comments | ask | show | jobs | submit login

Ideally, but not always true. For various versions of MySQL and Postgres, the planner will infer when a semi/anti-join can replace a WHERE [NOT] IN clause, but not always. IIRC there are still edge cases where neither one picks up on it, and so it’s always safer (and much more clear to the reader) to explicitly use WHERE [NOT] EXISTS if that’s what you want.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: