Re: why partition pruning doesn't work?

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: why partition pruning doesn't work?
Date: 2018-06-07 03:21:18
Message-ID: CAKJS1f8pcr5+LbK8hDyazE0ogP-f-KtwAjf-Psd-b5uCOhF9ug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7 June 2018 at 14:51, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> Thanks David. This one looks good. I also like it that hasparamlessexprs
> is no longer determined and set in the planner.

Thanks for checking it.

> I checked what happens with the cases that Ashutosh complained about
> upthread and seems that the pruning works as expected.

[...]

> explain (costs off, analyze) select * from t1 x left join t1 y on x.a =
> y.b + 100 where y.a = 5;

Yeah, I added a test to partition_prune.sql that verifies a similar case.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2018-06-07 03:38:12 Re: Loaded footgun open_datasync on Windows
Previous Message Jonathan S. Katz 2018-06-07 03:08:03 Re: commitfest 2018-07