Re: POC, WIP: OR-clause support for indexes

From: Andrei Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
To: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, Alena Rybakina <a(dot)rybakina(at)postgrespro(dot)ru>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Peter Geoghegan <pg(at)bowt(dot)ie>, "Finnerty, Jim" <jfinnert(at)amazon(dot)com>, Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>, teodor(at)sigaev(dot)ru, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Subject: Re: POC, WIP: OR-clause support for indexes
Date: 2024-03-14 10:11:15
Message-ID: 67bd918d-285e-44d2-a207-f52d9a4c35e6@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 14/3/2024 16:31, Alexander Korotkov wrote:
> On Wed, Mar 13, 2024 at 2:16 PM Andrei Lepikhov
> <a(dot)lepikhov(at)postgrespro(dot)ru <mailto:a(dot)lepikhov(at)postgrespro(dot)ru>> wrote:
> > On 13/3/2024 18:05, Alexander Korotkov wrote:
> > > On Wed, Mar 13, 2024 at 7:52 AM Andrei Lepikhov
> > > Given all of the above, I think moving transformation to the
> > > canonicalize_qual() would be the right way to go.
> > Ok, I will try to move the code.
> > I have no idea about the timings so far. I recall the last time I got
> > bogged down in tons of duplicated code. I hope with an almost-ready
> > sketch, it will be easier.
>
> Thank you!  I'll be looking forward to the updated patch.
Okay, I moved the 0001-* patch to the prepqual.c module. See it in the
attachment. I treat it as a transient patch.
It has positive outcomes as well as negative ones.
The most damaging result you can see in the partition_prune test:
partition pruning, in some cases, moved to the executor initialization
stage. I guess, we should avoid it somehow in the next version.

--
regards,
Andrei Lepikhov
Postgres Professional

Attachment Content-Type Size
v22-1-0001-Transform-OR-clauses-to-ANY-expression.patch text/plain 54.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2024-03-14 10:12:06 Re: remaining sql/json patches
Previous Message Daniel Gustafsson 2024-03-14 09:56:46 Re: Support json_errdetail in FRONTEND builds