The HashSubplan implementation for NOT-IN Sublink in Postgres

NOT-IN expressions with subquery in SQL are notorious but very common. Not only do programmers write such kinds of SQLs but also many BI applications generate the kinds of SQLs. With NULL values, things get much more complex and even much much more complex for MPP databases. In this blog, we focus on single-node Postgres to understand the data structures, semantics, and algorithms of this topic.

I will talk more about GPDB’s LASJ implementation of NOT-IN later.

Continue reading