Re: Query with high planning time at version 11.1 compared versions 10.5 and 11.0

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, alvherre(at)2ndquadrant(dot)com, pryzby(at)telsasoft(dot)com, sanyo(dot)moura(at)tatic(dot)net, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, david(dot)rowley(at)2ndquadrant(dot)com, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Query with high planning time at version 11.1 compared versions 10.5 and 11.0
Date: 2019-01-11 12:50:19
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-performance

(2019/01/11 13:46), Amit Langote wrote:
> On 2019/01/10 15:07, Etsuro Fujita wrote:
>> (2019/01/10 10:41), Amit Langote wrote:
>>> That's a loaded meaning and abusing it to mean something else can be
>>> challenged, but we can live with that if properly documented. Speaking of
>>> which:
>>> /* used by partitionwise joins: */
>>> bool consider_partitionwise_join; /* consider
>>> partitionwise join
>>> * paths? (if partitioned
>>> rel) */
>>> Maybe, mention here how it will be abused in back-branches for
>>> non-partitioned relations?
>> Will do.
> Thank you.

I know we don't yet reach a consensus on what to do in details to
address this issue, but for the above, how about adding comments like
this to set_append_rel_size(), instead of the header file:

* If we consider partitionwise joins with the parent rel, do
the same
* for partitioned child rels.
* Note: here we abuse the consider_partitionwise_join flag for
* rels that are not partitioned, to tell try_partitionwise_join()
* that their targetlists and EC entries have been generated.
if (rel->consider_partitionwise_join)
childrel->consider_partitionwise_join = true;

ISTM that that would be more clearer than the header file.

Updated patch attached, which also updated other comments a little bit.

Best regards,
Etsuro Fujita

Attachment Content-Type Size
0001-Add-child-EC-members-for-only-the-non-dummy-children-efujita-v2.patch text/x-patch 8.6 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2019-01-11 13:00:24 Re: speeding up planning with partitions
Previous Message Amit Kapila 2019-01-11 12:39:31 Re: unnecessary creation of FSM files during bootstrap mode

Browse pgsql-performance by date

  From Date Subject
Next Message Jim Finnerty 2019-01-12 15:47:09 Re: Detect missing combined indexes (automatically)
Previous Message Etsuro Fujita 2019-01-11 11:10:44 Re: Query with high planning time at version 11.1 compared versions 10.5 and 11.0