Re: Poor performance using CTE - Mailing list pgsql-performance

From Andres Freund
Subject Re: Poor performance using CTE
Date
Msg-id 20121121153209.GA1271@awork2.anarazel.de
Whole thread Raw
In response to Re: Poor performance using CTE  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Poor performance using CTE  (Claudio Freire <klaussfreire@gmail.com>)
Re: Poor performance using CTE  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
List pgsql-performance
On 2012-11-21 10:21:16 -0500, Andrew Dunstan wrote:
>
> On 11/21/2012 09:59 AM, Tom Lane wrote:
> >Andrew Dunstan <andrew@dunslane.net> writes:
> >>If we're going to do it can we please come up with something more
> >>intuitive and much, much more documented than "OFFSET 0"? And if/when we
> >>do this we'll need to have big red warnings all over then release notes,
> >>since a lot of people I know will need to do some extensive remediation
> >>before moving to such a release.
> >The probability that we would actually *remove* that behavior of OFFSET
> >0 is not distinguishable from zero.  I'm not terribly excited about
> >having an alternate syntax to specify an optimization fence, but even
> >if we do create such a thing, there's no need to break the historical
> >usage.
> >
>
> I wasn't talking about removing it. My point was that if the optimization
> fence around CTEs is removed a lot of people will need to rework apps where
> they have used them for that purpose. And I continue to think that spelling
> it "OFFSET 0" is horribly obscure.

+1

WITH foo AS (SELECT ...) (barrier=on|off)?

9.3 introduces the syntax, defaulting to on
9.4 switches the default to off.

Greetings,

Andres Freund


pgsql-performance by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Poor performance using CTE
Next
From: Peter Geoghegan
Date:
Subject: Re: Poor performance using CTE