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

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, sanyo(dot)moura(at)tatic(dot)net, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <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-10 12:23:40
Message-ID: CA+HiwqHyZSU_6+d3dPtA2Vb3BBH4pAG9zbQ0Yu9kbUOq7N5BnA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On Thu, Jan 10, 2019 at 6:49 PM Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> Though this will solve a problem for performance when partition-wise join is not possible, we still have the same problem when partition-wise join is possible. And that problem really happens because our inheritance mechanism requires expression translation from parent to child everywhere. That consumes memory, eats CPU cycles and generally downgrades performance of partition related query planning. I think a better way would be to avoid these translations and use Parent var 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2019-01-10 12:33:43 Strange wording in advanced tutorial
Previous Message Sergei Kornilov 2019-01-10 11:20:27 Re: Making WAL receiver startup rely on GUC context for primary_conninfo and primary_slot_name

Browse pgsql-performance by date

  From Date Subject
Next Message Thomas Güttler 2019-01-10 12:56:02 Detect missing combined indexes (automatically)
Previous Message Mariel Cherkassky 2019-01-10 10:40:22 Re: does dml operations load the blocks to the shared buffers ?