Re: Poor performance using CTE

From: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Craig Ringer <craig(at)2ndQuadrant(dot)com>, Claudio Freire <klaussfreire(at)gmail(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, David Greco <David_Greco(at)harte-hanks(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Poor performance using CTE
Date: 2012-11-21 21:24:55
Message-ID: 50AD46A7.103@archidevsys.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 22/11/12 08:42, Andrew Dunstan wrote:
>
> On 11/21/2012 02:30 PM, Gavin Flower wrote:
>> WITH FENCE foo AS (SELECT ...)
>> default?
>>
>>
>> WITHOUT FENCE foo AS (SELECT ...) :-)
>> Nah!
>> I prefer this, but it is too specific to 'WITH',
>> and very unSQL standardish!
>>
>> Alternatively one of the following
>>
>> 1. WITH UNFENCED foo AS (SELECT ...)
>> 2. WITH NO FENCE foo AS (SELECT ...)
>> 3. WITH NOT FENCE foo AS (SELECT ...)
>>
>> I loke the firsat variant, but the 3rd is
>> most SQL standardish!
>>
>
> As Tom (I think) pointed out, we should not have a syntax tied to CTEs.
>
> cheers
>
> andrew
>
If other SQL constructs have a optimisation fence, then the FENCE & NOT
FENCE syntax can be used theire as well.

So what am I missing? (obviously WITHOUT FENCE would not make sense
elsewhere, but I wasn't really being serious when I suggested it!)

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Craig Ringer 2012-11-22 00:08:54 Re: Poor performance using CTE
Previous Message Gavin Flower 2012-11-21 21:18:45 Re: Hints (was Poor performance using CTE)