Re: Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?

From: Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
To: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Rowley <dgrowleyml(at)gmail(dot)com>, Dmitry Astapov <dastapov(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?
Date: 2022-07-07 11:11:06
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 17/5/2022 05:00, Andy Fan wrote:
> Thanks.  But I will wait to see if anyone will show interest with this.
> Or else
> Moving alone is not a great experience.
To move forward I've rebased your patchset onto new master, removed
annoying tailing backspaces and applied two regression test changes,
caused by second patch: first of changes are legal, second looks normal
but should be checked on optimality.
As I see, a consensus should be found for the questions:
1. Case of redundant clauses (x < 100 and x < 1000)
2. Planning time degradation for trivial OLTP queries

Andrey Lepikhov
Postgres Professional

Attachment Content-Type Size
v5-0001-Expand-the-duties-of-check_mergejoinable-to-check-no.patch text/plain 7.2 KB
v5-0002-Introudce-ec_filters-in-EquivalenceClass-struct-the-.patch text/plain 51.9 KB
v5-0003-Reduce-some-planning-cost-for-deriving-qual-for-EC-f.patch text/plain 10.8 KB
v5-0004-Prepare-the-code-for-CorrectiveQual-structure.patch text/plain 2.9 KB
v5-0005-CorrectiveQuals-is-as-simple-as-a-List-of-RestrictIn.patch text/plain 19.7 KB
v5-0006-Disable-ec-filter-for-foregin-table-for-now.-We-do-n.patch text/plain 21.0 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2022-07-07 11:16:07 Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)
Previous Message Peter Eisentraut 2022-07-07 11:00:15 Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)