pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Andrew Dunstan <andrew@dunslane.net>
To: Claudio Freire <klaussfreire@gmail.com>
Cc: Andres Freund <andres@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: Craig Ringer <craig@2ndquadrant.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: Poor performance using CTE
Date: Wed, 21 Nov 2012 11:35:18 -0500
Message-ID: <50AD02C6.8070808@dunslane.net> (raw )
In-Reply-To: <CAGTBQpZc78Cmg8nuJ0HvaTRX0Bj5bTNoJUDWMpn8yd8Z9PTtAg@mail.gmail.com >
References: <CAHyXU0z4oUss50vhH_wGZ-HERQe9wCMSf1nMTGNddXeCoKvVVA@mail.gmail.com >
<CAGTBQpbf9bdJ3gjcYdw2FuPmN=dqx+wE7opsCp515cEndpGDYw@mail.gmail.com >
<50AC1472.3050607@2ndQuadrant.com >
<18123.1353455585@sss.pgh.pa.us >
<50ACD166.1000507@vmware.com >
<50ACE970.7050701@dunslane.net >
<3396.1353509947@sss.pgh.pa.us >
<50ACF16C.2020902@dunslane.net >
<20121121153209.GA1271@awork2.anarazel.de >
<CAGTBQpa14GQ+L9KSKdS+kXVWYkoEVNUBbvaUpgRjskufEx-=-A@mail.gmail.com >
<20121121162416.GA6268@awork2.anarazel.de >
<CAGTBQpZc78Cmg8nuJ0HvaTRX0Bj5bTNoJUDWMpn8yd8Z9PTtAg@mail.gmail.com >
On 11/21/2012 11:32 AM, Claudio Freire wrote:
> On Wed, Nov 21, 2012 at 1:24 PM, Andres Freund <andres@2ndquadrant.com> wrote:
>> On 2012-11-21 13:16:25 -0300, Claudio Freire wrote:
>>> On Wed, Nov 21, 2012 at 12:32 PM, Andres Freund <andres@anarazel.de> wrote:
>>>> +1
>>>>
>>>> WITH foo AS (SELECT ...) (barrier=on|off)?
>>>>
>>>> 9.3 introduces the syntax, defaulting to on
>>>> 9.4 switches the default to off.
>>> Why syntax? What about a guc?
>>>
>>> collapse_cte_limit?
>> Because there are very good reasons to want to current behaviour. A guc
>> is a global either/or so I don't see it helping much.
> set collapse_cte_limit=8;
> with blah as (blah) select blah;
>
> Not global at all.
>
Then you have to unset it again, which is ugly. You might even want it
applying to *part* of a query, not the whole thing, so this strikes me
as a dead end.
cheers
andrew
view thread (36+ messages) latest in thread
Message-ID: <50AD02C6.8070808@dunslane.net>
Permalink: ../50AD02C6.8070808@dunslane.net/
Also on: postgresql.org/message-id/50AD02C6.8070808@dunslane.net
copy link · copy postgr.es
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: andrew@dunslane.net, klaussfreire@gmail.com, andres@2ndquadrant.com, tgl@sss.pgh.pa.us, hlinnakangas@vmware.com, craig@2ndquadrant.com, mmoncure@gmail.com, David_Greco@harte-hanks.com
Subject: Re: Poor performance using CTE
In-Reply-To: <50AD02C6.8070808@dunslane.net>
* 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