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

From: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: 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-03-24 02:21:41
Message-ID: CAKU4AWqBCWQFREajZggbz9mpcJo_tdv9DR+QgwKWCdE5HbbOAg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi:

Thanks for take care of this.

On Tue, Mar 22, 2022 at 9:41 AM Andres Freund <andres(at)anarazel(dot)de> wrote:

> Hi,
>
> On 2022-03-08 21:44:37 +0800, Andy Fan wrote:
> > I have finished the PoC for planning timing improvement and joinrel rows
> > estimation.
>
> This currently crashes on cfbot:
> https://api.cirrus-ci.com/v1/task/6158455839916032/logs/cores.log
> https://cirrus-ci.com/task/6158455839916032
>
>
The crash happens at my own Assert statement. I assume we know the
Selectivity
for a RestrictInfo after set_rel_size, however this is not true for foreign
table with use_remote_estimate=true. Since we are in a design discussion
stage,
I just disable this feature for foreign tables and can fix it later. Would
this be the
right way to go?

> As this is clearly not 15 material, I've set the target version as 16. But
> it
> might be good to just move the whole entry to the next CF...
>
>
Thanks for doing that. I tried but didn't find how to move it to the next
CF.

Here is the latest code. I have rebased the code with the latest master
a1bc4d3590b.

--
Best Regards
Andy Fan

Attachment Content-Type Size
v4-0004-Prepare-the-code-for-CorrectiveQual-structure.patch application/octet-stream 2.9 KB
v4-0005-CorrectiveQuals-is-as-simple-as-a-List-of-Restric.patch application/octet-stream 19.7 KB
v4-0003-Reduce-some-planning-cost-for-deriving-qual-for-E.patch application/octet-stream 11.1 KB
v4-0002-Introudce-ec_filters-in-EquivalenceClass-struct-t.patch application/octet-stream 50.8 KB
v4-0001-expand-the-duties-of-check_mergejoinable-to-check.patch application/octet-stream 7.3 KB
v4-0006-Disable-ec-filter-for-foregin-table-for-now.patch application/octet-stream 20.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo NAGATA 2022-03-24 02:43:20 Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors
Previous Message Amit Kapila 2022-03-24 02:13:37 Re: freeing bms explicitly