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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-01 21:50:08
Message-ID: CA+TgmoZSJpZY78Etvyc-xrZ+acjGWDCyr7mjLQbQWB2U_gyHZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 21, 2022 at 2:31 AM Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com> wrote:
> +1. Just to be more precise, are you also confused about why this
> should not be done at all. IIUC, I get 3 reasons from Tom's reply.
> a). Planning cost. b). estimation error. c) extra qual execution is bad.

This topic has been discussed a number of times, and Tom has basically
always said that he thinks this would be expensive to plan (which I
think is true) and that we wouldn't get much benefit (which I think is
false).

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-03-01 21:58:48 Re: Checkpointer sync queue fills up / loops around pg_usleep() are bad
Previous Message Robert Haas 2022-03-01 21:46:40 Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations