From: Arne Roland <A.Roland@index.de>
To: Richard Guo <riguo@pivotal.io>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Subject: Re: Partial join
Date: Mon, 19 Aug 2019 15:17:21 +0000
Message-ID: <22c352db506e4636b397d41a5dcba7e6@index.de> (raw)
In-Reply-To: <CAN_9JTwYzbHOttsZ0amun0whj5di1S+-Dec9VD3ykA+Odz4KXg@mail.gmail.com>
References: <9dc03e949e9b4327a0d074da9ab44318@index.de>
<dd01626a46a342f7b1d811cf38fcebe6@index.de>
<CAN_9JTwYzbHOttsZ0amun0whj5di1S+-Dec9VD3ykA+Odz4KXg@mail.gmail.com>
Richard Guo <riguo@pivotal.io> wrote:
> Please refer to the code snippet below:
>
> @@ -1164,8 +1164,8 @@ generate_join_implied_equalities(PlannerInfo *root,
> List *sublist = NIL;
>
> /* ECs containing consts do not need any further enforcement */
> if (ec->ec_has_const)
> continue;
Sorry, I'm quite busy currently. And thanks! That was a good read.
I might be wrong, but I think have_partkey_equi_join in joinrels.c should be aware of the const case. My naive approach would be keeping pointers to the first few constant clauses, which are referencing to a yet unmatched partition key, to keep the memory footprint feasible in manner similar to pk_has_clause. The question would be what to do, if there are a lot of const expressions on the part keys. One could palloc additional memory in that case, hoping that it will be quite rare. Or is there a different, better way to go about that?
Thank you for your feedback!
Regards
Arne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: A.Roland@index.de, riguo@pivotal.io, pgsql-hackers@lists.postgresql.org
Subject: Re: Partial join
In-Reply-To: <22c352db506e4636b397d41a5dcba7e6@index.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox