Re: Early WIP/PoC for inlining CTEs - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Early WIP/PoC for inlining CTEs
Date
Msg-id 20190118204238.zb6vogaeqkzduapu@alap3.anarazel.de
Whole thread Raw
In response to Re: Early WIP/PoC for inlining CTEs  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Early WIP/PoC for inlining CTEs  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2019-01-18 15:34:46 -0500, Robert Haas wrote:
> On Thu, Jan 17, 2019 at 10:48 AM Andreas Karlsson <andreas@proxel.se> wrote:
> > On 1/11/19 8:10 PM, Robert Haas wrote:
> > > WITH cte_name [[NOT] MATERIALIZED] AS (query) main_query...
> >
> > Hm, when would one want "NOT MATERIALIZED"? I am not sure I see the
> > usefulness of forcing inlining other than if we by default do not inline
> > when a CTE is referenced multiple times.
> 
> When the planner materializes it, but the performance of the resulting
> plan therefore sucks, I suppose.
> 
> I don't feel super-strongly about this, and Tom is right that there
> may be cases where materialization is just not practical due to
> implementation restrictions.

*not* materializing I assume?

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Early WIP/PoC for inlining CTEs
Next
From: Robert Haas
Date:
Subject: Re: Early WIP/PoC for inlining CTEs