Re: NOT IN subquery optimization

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: "Li, Zheng" <zhelli(at)amazon(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: NOT IN subquery optimization
Date: 2019-08-01 22:57:45
Message-ID: CA+hUKGLr2_xwZsKdd+MxM6Vei7j83wxYrCJQstWAXZU_3jjKHg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jun 29, 2019 at 4:19 AM Li, Zheng <zhelli(at)amazon(dot)com> wrote:>
> Resending patch v2.2, looks like the previous submission did not get attached to the original thread.
>
> This version fixed an issue that involves CTE. Because we call subquery_planner before deciding whether to proceed with the transformation, we need to setup access to upper level CTEs at this point if the subquery contains any CTE RangeTblEntry.
>
> Also added more test cases of NOT IN accessing CTEs, including recursive CTE. It's nice that CTE can use index now!

Hi Zheng, Jim,

With my Commitfest doozer hat on, I have moved this entry to the
September 'fest. I noticed in passing that it needs to be adjusted
for the new pg_list.h API. It'd be good to get some feedback from
reviewers on these two competing proposals:

https://commitfest.postgresql.org/24/2020/
https://commitfest.postgresql.org/24/2023/

--
Thomas Munro
https://enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2019-08-01 23:07:12 Re: Data-only pg_rewind, take 2
Previous Message Tom Lane 2019-08-01 22:57:16 Re: Optimze usage of immutable functions as relation