From: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> |
---|---|
To: | Richard Guo <riguo(at)pivotal(dot)io> |
Cc: | "Li, Zheng" <zhelli(at)amazon(dot)com>, "Finnerty, Jim" <jfinnert(at)amazon(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: NOT IN subquery optimization |
Date: | 2019-03-01 12:53:03 |
Message-ID: | CAKJS1f-bs3YnhNVR9AHb8BATrDD_GATYXTxOgwBZhpehF+qVBg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 1 Mar 2019 at 15:27, Richard Guo <riguo(at)pivotal(dot)io> wrote:
> I have reviewed your patch. Good job except two issues I can find:
>
> 1. The patch would give wrong results when the inner side is empty. In this
> case, the whole data from outer side should be in the outputs. But with the
> patch, we will lose the NULLs from outer side.
>
> 2. Because of the new added predicate 'OR (var is NULL)', we cannot use hash
> join or merge join to do the ANTI JOIN. Nested loop becomes the only choice,
> which is low-efficency.
Yeah. Both of these seem pretty fundamental, so setting the patch to
waiting on author.
--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Meskes | 2019-03-01 13:01:07 | Re: SQL statement PREPARE does not work in ECPG |
Previous Message | Surafel Temesgen | 2019-03-01 12:47:43 | Re: FETCH FIRST clause PERCENT option |