From: | Beena Emerson <memissemerson(at)gmail(dot)com> |
---|---|
To: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> |
Cc: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Robert Haas <robertmhaas(at)gmail(dot)com>, amul sul <sulamul(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
Subject: | Re: [HACKERS] Runtime Partition Pruning |
Date: | 2017-12-19 08:54:26 |
Message-ID: | CAOG9ApHyt1162NJmtbp26RFY0Nkx+HK5CyV9DOQaJSrBm=rQKQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello,
On Mon, Dec 18, 2017 at 4:03 PM, David Rowley
<david(dot)rowley(at)2ndquadrant(dot)com> wrote:
>
>> We could do something similar here using a similar code structure. Maybe,
>> add a ExecSetupPartitionRuntimePruning() in execPartition.c (mimicking
>> ExecSetupPartitionTupleRouting), that accepts AppendState node.
>> Furthermore, it might be a good idea to have something similar to
>> ExecFindPartition(), say, ExecGetPartitions(). That is, we have new
>> functions for run-time pruning that are counterparts to corresponding
>> functions for tuple routing.
>
> Seems to me in this case we're better to build this structure during
> planning and save it with the plan so that it can be used over and
> over, rather than building it again and again each time the plan is
> executed. Likely a common use case for run-time pruning is when the
> plan is going to be used multiple times with different parameters, so
> we really don't want to repeat any work that we don't have to here.
>
I agree. It would be better to avoid building the structure during execution.
PFA the updated patch.
--
Beena Emerson
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment | Content-Type | Size |
---|---|---|
0001-Implement-runtime-partiton-pruning_v7_WIP.patch | application/octet-stream | 43.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Oleksandr Shulgin | 2017-12-19 09:47:12 | Estimate maintenance_work_mem for CREATE INDEX |
Previous Message | Beena Emerson | 2017-12-19 08:44:57 | Re: [HACKERS] Runtime Partition Pruning |