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

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Etsuro Fujita <fujita(dot)etsuro(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-15 01:51:54
Message-ID: 2c68deec-f25b-90e8-ad0b-73c7092692cf@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On 2019/01/15 10:46, Amit Langote wrote:
> On 2019/01/11 20:04, Etsuro Fujita wrote:
>> One thing I intended in that commit was to set the flag to false for
>> partitioned tables contained in inheritance trees where the top parent is
>> a UNION ALL subquery, because we don't consider PWJ for those tables.
>>  Actually we wouldn't need to care about that, because we don't do PWJ for
>> those tables regardless of what the flag is set, but I think that would
>> make the code a bit cleaner.
>
> Yeah, we wouldn't do partitionwise join between partitioned tables that
> are under UNION ALL.
>
>> However, what you proposed here as-is would
>> not keep that behavior, because rel->part_scheme is created for those
>> tables as well
>
> It'd be easy to prevent set consider_partitionwise_join to false in that
> case as:

Oops, I meant to say:

It'd be easy to prevent setting consider_partitionwise_join in that case as:

>
> + rel->consider_partitionwise_join = (rel->part_scheme != NULL &&
> + (parent == NULL ||
> + parent->rtekind != RTE_SUBQUERY));

Thanks,
Amit

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2019-01-15 01:56:04 Re: Copy function for logical replication slots
Previous Message Amit Langote 2019-01-15 01:46:34 Re: Query with high planning time at version 11.1 compared versions 10.5 and 11.0

Browse pgsql-performance by date

  From Date Subject
Next Message Amit Langote 2019-01-15 02:42:18 Re: Query with high planning time at version 11.1 compared versions 10.5 and 11.0
Previous Message Amit Langote 2019-01-15 01:46:34 Re: Query with high planning time at version 11.1 compared versions 10.5 and 11.0