Re: Early WIP/PoC for inlining CTEs

From: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
To: Andres Freund <andres(at)anarazel(dot)de>, Jeremy Finzel <finzelj(at)gmail(dot)com>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Early WIP/PoC for inlining CTEs
Date: 2018-07-24 23:50:12
Message-ID: 370b56e3-3d66-ba6e-6a94-6437e3eba5ad@archidevsys.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25/07/18 11:10, Andres Freund wrote:
> On 2018-07-24 18:03:43 -0500, Jeremy Finzel wrote:
>> On Tue, Jul 24, 2018 at 5:28 PM Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
>> wrote:
>>
[...]
>>> In our environment we often want this to be a fence. For example it can
[...]
> This essentially has been discussed already:
> http://archives.postgresql.org/message-id/5351711493487900%40web53g.yandex.ru
>
> My read of the concensus (in which I am in the majority, so I might be
> biased) is that we do want inlining to be the default. We were thinking
> that it'd be necessary to provide a way to force inlining on the SQL
> level for individual CTEs.
>
>
>> Curious what other RDBMSs do here?
> They largely inline by default.
>
> Greetings,
>
> Andres Freund
>
If I'd not read anything about CTE's being a fence, I would have
implicitly assumed that they were optimised together with the main part
of the SQL statement, and I suspect that is the case for most people.

So I'm very much a favour of optimisation of CTE's being the default.

Cheers,
Gavin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-07-24 23:54:16 Re: Early WIP/PoC for inlining CTEs
Previous Message Tom Lane 2018-07-24 23:49:19 Re: Early WIP/PoC for inlining CTEs