From: Shaun Thomas <sthomas@optionshouse.com>
To: Craig Ringer <craig@2ndQuadrant.com>
Cc: Craig James <cjames@emolecules.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Claudio Freire <klaussfreire@gmail.com>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: David Greco <David_Greco@harte-hanks.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Hints (was Poor performance using CTE)
Date: Wed, 21 Nov 2012 07:27:18 -0600
Message-ID: <50ACD6B6.1030905@optionshouse.com> (raw)
In-Reply-To: <50AC3935.6060508@2ndQuadrant.com>
References: <CAFwQ8rfPGgcgn5kxpJEwu_mtJh19ehuQcO5CMJp7+mF6PPe+eA@mail.gmail.com>
<50AC3935.6060508@2ndQuadrant.com>
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@optionshouse.com
______________________________________________
See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email
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: sthomas@optionshouse.com, craig@2ndQuadrant.com, cjames@emolecules.com, tgl@sss.pgh.pa.us, klaussfreire@gmail.com, mmoncure@gmail.com, David_Greco@harte-hanks.com
Subject: Re: Hints (was Poor performance using CTE)
In-Reply-To: <50ACD6B6.1030905@optionshouse.com>
* 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