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 CA+HiwqHyZSU_6+d3dPtA2Vb3BBH4pAG9zbQ0Yu9kbUOq7N5BnA@mail.gmail.com
Whole thread Raw
In response to Re: Query with high planning time at version 11.1 compared versions10.5 and 11.0  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Responses Re: Query with high planning time at version 11.1 compared versions10.5 and 11.0  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
List pgsql-hackers
On Thu, Jan 10, 2019 at 6:49 PM Ashutosh Bapat
<ashutosh.bapat.oss@gmail.com> wrote:
> Though this will solve a problem for performance when partition-wise join is not possible, we still have the same
problemwhen partition-wise join is possible. And that problem really happens because our inheritance mechanism requires
expressiontranslation from parent to child everywhere. That consumes memory, eats CPU cycles and generally downgrades
performanceof partition related query planning. I think a better way would be to avoid these translations and use
Parentvar to represent a Var of the child being dealt with. That will be a massive churn on inheritance based planner
code,but it will improve planning time for queries involving thousands of partitions. 

Yeah, it would be nice going forward to overhaul inheritance planning
such that parent-to-child Var translation is not needed, especially
where no pruning can occur or many partitions remain even after
pruning.

Thanks,
Amit


pgsql-hackers by date:

Previous
From: Sergei Kornilov
Date:
Subject: Re: Making WAL receiver startup rely on GUC context for primary_conninfo and primary_slot_name
Next
From: Daniel Gustafsson
Date:
Subject: Strange wording in advanced tutorial