NOT IN to anti-join
Converting NOT IN sublinks to anti-joins using non-nullability proofs.
Versions
- PostgreSQL 20 · worked-on · improved · moderate
- PostgreSQL 19 · shipped · new · moderate · 5 commits · +1.9k / -333 lines
- PostgreSQL 18 · worked-on · new · moderate
Threads
- Convert ALL SubLinks to ANY SubLinks
- BUG #19852: NOT IN -> anti-join conversion gives wrong results when the equality operator returns NULL for non-n
- Incorrect NOT IN results with implicit casts returning NULL after anti-join optimization
- pgsql: Teach expr_is_nonnullable() to handle more expression types
- Prove a NOT IN's left-hand expressions non-nullable from quals
- Wrong results: NOT IN to anti-join with an upper-level Var in the sub-select's output
- [PATCH] SAOP nullability analysis below NOT/BooleanTest
- var_is_nonnullable() fails to handle invalid NOT NULL constraints
- Convert NOT IN sublinks to anti-joins when safe
- Reduce "Var IS [NOT] NULL" quals during constant folding
- Reduce "Var IS [NOT] NULL" quals during constant folding
- Anti join confusion
- Postgres NOT IN vs NOT EXISTS optimization
- Converting NOT IN to anti-joins during planning
- NOT IN subquery optimization
- Re: NOT IN subquery optimization
- NOT IN subquery optimization
- Proposal: Better query optimization for "NOT IN" clause
- Allowing NOT IN to use ANTI joins