Re: Query with high planning time at version 11.1 compared versions10.5 and 11.0 - Mailing list pgsql-hackers

From Amit Langote
Subject Re: Query with high planning time at version 11.1 compared versions10.5 and 11.0
Date
Msg-id 2c68deec-f25b-90e8-ad0b-73c7092692cf@lab.ntt.co.jp
Whole thread Raw
In response to Re: Query with high planning time at version 11.1 compared versions10.5 and 11.0  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Query with high planning time at version 11.1 compared versions10.5 and 11.0
Next
From: Masahiko Sawada
Date:
Subject: Re: Copy function for logical replication slots