Ashutosh Bapat писал 2021-04-14 16:01:
On Tue, Apr 13, 2021 at 6:58 PM Alexander Pyhalov
wrote:
I believe step2 is needed to avoid materializing rows which will never
be selected. That would be a good improvement. However, care needs to
be taken for volatile quals. I think, the quals on CTE w
On Tue, Apr 13, 2021 at 6:58 PM Alexander Pyhalov
wrote:
>
> Hi.
>
> Currently PostgreSQL supports CTE push down for SELECT statements, but
> it is implemented as turning each CTE reference into subquery.
>
> When CTE is referenced multiple times, we have choice - to m
Hi.
Currently PostgreSQL supports CTE push down for SELECT statements, but
it is implemented as turning each CTE reference into subquery.
When CTE is referenced multiple times, we have choice - to materialize
CTE (and disable quals distribution to the CTE query) or inline it (and
so run CTE