Re: speeding up planning with partitions - Mailing list pgsql-hackers

From Amit Langote
Subject Re: speeding up planning with partitions
Date
Msg-id d724e640-c197-e89f-85ea-e8e11625c48e@lab.ntt.co.jp
Whole thread Raw
In response to Re: speeding up planning with partitions  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
Thanks Justin for reporting the results of your testing.

On 2019/01/07 17:40, David Rowley wrote:
> On Fri, 4 Jan 2019 at 04:39, Justin Pryzby <pryzby@telsasoft.com> wrote:
>> Running 11dev with your v10 patch applied, this takes 2244ms with empty buffer
>> cache after postmaster restarted on a totally untuned instance (and a new
>> backend, with no cached opened files).
>>
>> I was curious why it took even 2sec, and why it did so many opens() (but not
>> 20k of them that PG11 does):
> 
> It would be pretty hard to know that without seeing the query plan.

Yeah, I too would be curious to see if the resulting plan really needs to
do those open()s.  If all the open()s being seen here are accounted for by
un-pruned partitions (across the UNION ALL) contained in the plan and
their indexes, then the patch has done enough to help.  If the open()s can
be traced to pruned partitions, then there's something wrong with the patch.

Thanks,
Amit



pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line
Next
From: Christoph Berg
Date:
Subject: Re: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well