RE: Why does not subquery pruning conditions inherit to parentquery? - Mailing list pgsql-hackers

From Kato, Sho
Subject RE: Why does not subquery pruning conditions inherit to parentquery?
Date
Msg-id 25C1C6B2E7BE044889E4FE8643A58BA97264D26A@G01JPEXMBKW03
Whole thread Raw
In response to Re: Why does not subquery pruning conditions inherit to parent query?  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: Why does not subquery pruning conditions inherit to parent query?
List pgsql-hackers
On Friday, May 31, 2019 9:33 PM, David Rowley wrote:
> On Fri, 31 May 2019 at 03:18, Kato, Sho <kato-sho@jp.fujitsu.com> wrote:
> > Is it possible to improve a subquery quals to pull up into outer query?
> 
> Sure, it's possible, but it would require writing code. When it can and
> cannot/should not be done would need to be determined.

Is there any harmful effect by pulling up a subquery quals into outer query?

Even if this feature is not be needed, it will be a problem if user execute this query to a table partitioned into a
lot.
So, I think it would be better to put together a query that partition pruning does not work on the wiki.
Thoughts?

Regards,
kato sho
> -----Original Message-----
> From: David Rowley [mailto:david.rowley@2ndquadrant.com]
> Sent: Friday, May 31, 2019 9:33 PM
> To: Kato, Sho/加藤 翔 <kato-sho@jp.fujitsu.com>
> Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-hackers@postgresql.org
> Subject: Re: Why does not subquery pruning conditions inherit to parent
> query?
> 
> On Fri, 31 May 2019 at 03:18, Kato, Sho <kato-sho@jp.fujitsu.com> wrote:
> > Is it possible to improve a subquery quals to pull up into outer query?
> 
> Sure, it's possible, but it would require writing code. When it can and
> cannot/should not be done would need to be determined.
> 
> --
>  David Rowley                   http://www.2ndQuadrant.com/
>  PostgreSQL Development, 24x7 Support, Training & Services
> 
> 


pgsql-hackers by date:

Previous
From: "Matsumura, Ryo"
Date:
Subject: Bug: ECPG: Cannot use CREATE AS EXECUTE statemnt
Next
From: Dent John
Date:
Subject: Use of reloptions by EXTENSIONs