pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gavin Flower <GavinFlower@archidevsys.co.nz>
To: Peter Geoghegan <peter@2ndquadrant.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Craig Ringer <craig@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Greco <David_Greco@harte-hanks.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: SOLVED - RE: Poor performance using CTE
Date: Fri, 16 Nov 2012 07:26:17 +1300
Message-ID: <50A533C9.9000701@archidevsys.co.nz> (raw)
In-Reply-To: <CAEYLb_XLgrFBMM5Ce9ZBoa0K+NY1hpFXyvXeaf6yWbHOjn3-3g@mail.gmail.com>
References: <187F6C10D2931A4386EE8E58E13857F61291D897@BY2PRD0811MB415.namprd08.prod.outlook.com>
	<20462.1352910543@sss.pgh.pa.us>
	<50A442A8.10803@2ndQuadrant.com>
	<50A4497D.80902@dunslane.net>
	<CAEYLb_XLgrFBMM5Ce9ZBoa0K+NY1hpFXyvXeaf6yWbHOjn3-3g@mail.gmail.com>

On 15/11/12 15:03, Peter Geoghegan wrote:
> On 15 November 2012 01:46, Andrew Dunstan <andrew@dunslane.net> wrote:
>> It cuts both ways. I have used CTEs a LOT precisely because this behaviour
>> lets me get better plans. Without that I'll be back to using the "offset 0"
>> hack.
> Is the "OFFSET 0" hack really so bad? We've been telling people to do
> that for years, so it's already something that we've effectively
> committed to.
>
How about adding the keywords FENCED and NOT FENCED to the SQL 
definition of CTE's - with FENCED being the default?


Cheers,
Gavin





view thread (16+ messages)  latest in thread

Message-ID: <50A533C9.9000701@archidevsys.co.nz>
Permalink:  ../50A533C9.9000701@archidevsys.co.nz/
Also on:    postgresql.org/message-id/50A533C9.9000701@archidevsys.co.nz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: GavinFlower@archidevsys.co.nz, peter@2ndquadrant.com, andrew@dunslane.net, craig@2ndquadrant.com, tgl@sss.pgh.pa.us, David_Greco@harte-hanks.com
  Subject: Re: SOLVED - RE: Poor performance using CTE
  In-Reply-To: <50A533C9.9000701@archidevsys.co.nz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox