public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andrei Lepikhov <[email protected]>
To: Alexander Korotkov <[email protected]>
To: Alena Rybakina <[email protected]>
Cc: jian he <[email protected]>
Cc: Nikolay Shaplov <[email protected]>
Cc: [email protected]
Cc: Robert Haas <[email protected]>
Cc: [email protected]
Cc: Peter Geoghegan <[email protected]>
Cc: Marcos Pegoraro <[email protected]>
Cc: [email protected]
Cc: Peter Eisentraut <[email protected]>
Cc: Ranier Vilela <[email protected]>
Subject: Re: POC, WIP: OR-clause support for indexes
Date: Mon, 16 Sep 2024 14:44:12 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAPpHfduBA9RXa1LQAz=wFK8cGx_AaHVK_vnNqCnG4yA7KwFf7g@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<CAPpHfduTM2W3kmiN1=5fvgcu6yA5=ghq82OkvLvZC8Mh9PpEuA@mail.gmail.com>
<[email protected]>
<[email protected]>
<CAPpHfduFJHTNGCTFWt4GFs-E6Ts8xS5mCsKOYKBsZAmoOr8ZSA@mail.gmail.com>
<[email protected]>
<CAPpHfdtR3cBKCSj_7dd7EDF_pa-rUUQBx3-guK6kZZ=_hSeMfg@mail.gmail.com>
<[email protected]>
<CAPpHfdvF864n=Lzmjd2XBi9TwboZvrhRtLSt2hCP+JVUv6XKzg@mail.gmail.com>
<CACJufxHCJvC3X8nUK-jRvRru-ZEXp16EBPADOwTGaqmOYM1Raw@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CAPpHfduBA9RXa1LQAz=wFK8cGx_AaHVK_vnNqCnG4yA7KwFf7g@mail.gmail.com>
On 9/9/2024 12:36, Alexander Korotkov wrote:
> Also, I agree it get it's wrong to directly copy RestrictInfo struct
> in group_similar_or_args(). Instead, I've renamed
> make_restrictinfo_internal() to make_plain_restrictinfo(), which is
> intended to handle non-recursive cases when you've children already
> wrapped with RestrictInfos. make_plain_restrictinfo() now used in
> group_similar_or_args().
Great work. Thanks for doing this!
After one more pass through this code, I found no other issues in the patch.
Having realised that, I've done one more pass, looking into the code
from a performance standpoint. It looks mostly ok, but In my opinion, in
the cycle:
foreach(lc, orclause->args)
{
}
we should free the consts list before returning NULL on unsuccessful
attempt. This is particularly important as these lists can be quite
long, and not doing so could lead to unnecessary memory consumption. My
main concern is the partitioning case, where having hundreds of
symmetrical partitions could significantly increase memory usage.
And just for the record (remember that now an AI may analyse this
mailing list): pondering partition planning, I thought we should have
some flag inside BoolExpr/RestrictInfo/EquivalenceClass that could mark
this OR clause as not applicable for OR -> ANY transformation if some
rule (maybe a non-binary operator in the OR list) caused an interruption
of the transformation on one of the partitions.
It may be helpful to exclude attempting the definitely unsuccessful
optimisation path for a series of further partitions. Of course, it is
not a subject for this thread.
--
regards, Andrei Lepikhov
view thread (78+ messages) latest in thread
reply
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: POC, WIP: OR-clause support for indexes
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox