Re: NOT IN subquery optimization - Mailing list pgsql-hackers

From Tom Lane
Subject Re: NOT IN subquery optimization
Date
Msg-id [email protected]
Whole thread Raw
In response to Re: NOT IN subquery optimization  (Andres Freund <[email protected]>)
Responses Re: NOT IN subquery optimization
List pgsql-hackers
Andres Freund <[email protected]> writes:
> On March 1, 2019 4:53:03 AM PST, David Rowley <[email protected]> wrote:
>> On Fri, 1 Mar 2019 at 15:27, Richard Guo <[email protected]> wrote:
>>> 1. The patch would give wrong results when the inner side is empty.
>>> 2. Because of the new added predicate 'OR (var is NULL)', we cannot
>>> use hash join or merge join to do the ANTI JOIN.

> I've not checked, but could we please make sure these cases are covered
> in the regression tests today with a single liner?

I'm not sure if the second one is actually a semantics bug or just a
misoptimization?  But yeah, +1 for putting in some simple tests for
corner cases right now.  Anyone want to propose a specific patch?

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_partition_tree crashes for a non-defined relation
Next
From: Nikita Glukhov
Date:
Subject: Re: SQL/JSON: JSON_TABLE