Re: Hints (was Poor performance using CTE)

From: Shaun Thomas <sthomas(at)optionshouse(dot)com>
To: Craig Ringer <craig(at)2ndQuadrant(dot)com>
Cc: Craig James <cjames(at)emolecules(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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: Hints (was Poor performance using CTE)
Date: 2012-11-21 13:27:18
Message-ID: 50ACD6B6.1030905@optionshouse.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 11/20/2012 08:15 PM, Craig Ringer wrote:

> I think it's time to admit that and get the syntax in place for CTEs so
> there's room to optimize them later, rather than cementing
> CTEs-as-fences in forever as a Pg quirk.

I know I'm just some schmo, but I'd vote for this. I'm certainly guilty
of using OFFSET 0. Undocumented hints are still hints. As much as I
think they're a bad idea by cementing a certain plan that may not get
the benefits of future versions, non-intuitive side-effects by using
overloaded syntax are worse.

I've been using CTEs as temp tables because I know that's how they work.
But I'd be more than willing to modify my syntax one way or the other to
adopt non-materialized CTEs, provided there's some way to get the
current behavior.

--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-444-8534
sthomas(at)optionshouse(dot)com

______________________________________________

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2012-11-21 13:42:32 Re: Hints (was Poor performance using CTE)
Previous Message Peter Geoghegan 2012-11-21 13:15:40 Re: Poor performance using CTE