public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andy Fan <[email protected]>
To: Tomas Vondra <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: David Rowley <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Dmitry Astapov <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?
Date: Mon, 21 Feb 2022 15:46:07 +0800
Message-ID: <CAKU4AWph8k9QdDGtnQAZoGb2HawbPBEZQvv8xcZMZ3mZez-hjw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAFQUnFhqkWuPCwQ1NmHYrisHJhYx4DoJak-dV+FcjyY6scooYA@mail.gmail.com>
<[email protected]>
<CAFQUnFiQJJctiZd_vO5Tt8yN=H9Pwpg4AfzcyRCCmEz6jnmAvQ@mail.gmail.com>
<[email protected]>
<CAApHDvpeaY_6+uudYp8qv42atqmPGA+mdfXWUM=oNnOmqBvEnw@mail.gmail.com>
<CAKU4AWpo9z0hMHDWUKuce4Z-NpcybV0J2UVu5+DVwyP-CrHCQg@mail.gmail.com>
<CA+TgmoaC9zGwxhoi6o0gAGXXBrkZxf+GRokNtaN9AmjjhD8j1g@mail.gmail.com>
<[email protected]>
<CA+TgmoYYMvZm1EnHrD8sBovZ=x2Piy9_yew3J1LDyCW39Ey-HQ@mail.gmail.com>
<[email protected]>
>
>
> >> It actually deals with a more general form of this case, because the
> >> clauses don't need to reference the same attribute - so for example this
> >> would work too, assuming there is extended stats object on the columns
> >> on each side:
> >>
> >> P(A.c = B.d | (A.e < 42) & (B.f < 42))
> >
> > That'd be cool.
> >
>
> Yeah, but the patch implementing this still needs more work.
>
>
Thanks for that patch. That patch has been on my study list for a long
time and it can fix the other real case I met some day ago. I spent one
day studying it again yesterday just that the result does not deserve
sharing at the current stage. As for the purpose here, if we have
extended statistics, I believe it can work well. But requiring extended
statistics for this feature does not look very reasonable to me. Do you
think we can go further in direction for the issue here? and it would
be super great that you can take a look at the commit 3 [1]. IIUC,
It can solve the issue and is pretty straightforward.
[1]
https://www.postgresql.org/message-id/CAKU4AWrdeQZ8xvf%3DDVhndUs%3DRGn8oVoSJvYK3Yj7uWq2%3Ddt%3DMg%40...
--
Best Regards
Andy Fan
view thread (5+ messages)
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]
Subject: Re: Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?
In-Reply-To: <CAKU4AWph8k9QdDGtnQAZoGb2HawbPBEZQvv8xcZMZ3mZez-hjw@mail.gmail.com>
* 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