Re: [HACKERS] path toward faster partition pruning

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Beena Emerson <memissemerson(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] path toward faster partition pruning
Date: 2018-03-26 11:42:57
Message-ID: d172e2cf-3990-f25a-5067-b52c85c68d6e@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi David.

On 2018/03/25 14:32, David Rowley wrote:
> On 25 March 2018 at 18:28, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> wrote:
>> The attached delta applies on top of v39 plus delta1.
>
> Sorry, the attached should do this. Ignore the last attachment.

I have incorporated both of your delta1 and delta2_1 patches.

Your proposed change to determine the cross-type comparison function OID
during planning itself is a good one, although I wasn't sure why it was
done only for the <> operators. I also implemented that for
PartitionPruneStepOp steps.

Also, I started thinking that implementing pruning using <> operators with
a PartitionPruneCombineOp was not such a great idea. That needed us to
add argexprs and argcmpfns to that struct, which seemed a bit odd. I
defined a new pruning node type called PartitionPruneStepOpNe, which still
seems a bit odd, but given that our support for pruning using <> is quite
specialized, that may be fine.

I added a bunch of hopefully informative comments in partprune.c and for
the struct definitions of pruning step nodes.

Please find attached find a new version.

Thanks,
Amit

Attachment Content-Type Size
v40-0001-Add-partsupfunc-to-PartitionSchemeData.patch text/plain 3.4 KB
v40-0002-Add-more-tests-for-partition-pruning.patch text/plain 16.3 KB
v40-0003-Faster-partition-pruning.patch text/plain 114.7 KB
v40-0004-Add-only-unpruned-partitioned-child-rels-to-part.patch text/plain 24.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2018-03-26 11:46:28 Re: PATCH: Exclude unlogged tables from base backups
Previous Message Thomas Munro 2018-03-26 11:32:05 Re: new function for tsquery creartion