Re: SOLVED - RE: [PERFORM] Poor performance using CTE

2012-11-23 Thread Bruce Momjian
On Tue, Nov 20, 2012 at 02:24:01PM -0600, Merlin Moncure wrote: > On Tue, Nov 20, 2012 at 1:53 PM, Jon Nelson wrote: > > As can be seen by the current conversation, not everyone is convinced > that CTEs ought to be an explicit optimization barrier > > On Tue, Nov 20, 2012 at 1:26 PM, Claudio Frei

Re: [PERFORM] Poor performance using CTE

2012-11-23 Thread Gavin Flower
On 22/11/12 04:56, Heikki Linnakangas wrote: On 21.11.2012 17:42, Gavin Flower wrote: On 22/11/12 04:32, Andres Freund wrote: On 2012-11-21 10:21:16 -0500, Andrew Dunstan wrote: I wasn't talking about removing it. My point was that if the optimization fence around CTEs is removed a lot of peop

Re: [PERFORM] Hints (was Poor performance using CTE)

2012-11-23 Thread Gavin Flower
On 22/11/12 06:28, Craig James wrote: On Wed, Nov 21, 2012 at 9:25 AM, Joe Conway > wrote: On 11/21/2012 08:05 AM, Heikki Linnakangas wrote: > Rather than telling the planner what to do or not to do, I'd much rather > have hints that give the planner

Re: [PERFORM] Hints (was Poor performance using CTE)

2012-11-23 Thread Cédric Villemain
Le mercredi 21 novembre 2012 17:34:02, Craig James a écrit : > On Wed, Nov 21, 2012 at 5:42 AM, Kevin Grittner wrote: > > It's a tough problem. Disguising and not documenting the available > > optimizer hints leads to more reports on where the optimizer should > > be smarter, and has spurred optim

Re: [PERFORM] Poor performance using CTE

2012-11-23 Thread Gavin Flower
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. WIT

Re: [PERFORM] Poor performance using CTE

2012-11-23 Thread Gavin Flower
On 22/11/12 13:08, Craig Ringer wrote: On 11/22/2012 03:30 AM, Gavin Flower wrote: On 22/11/12 04:56, Heikki Linnakangas wrote: On 21.11.2012 17:42, Gavin Flower wrote: On 22/11/12 04:32, Andres Freund wrote: On 2012-11-21 10:21:16 -0500, Andrew Dunstan wrote: I wasn't talking about removing

Re: [PERFORM] Poor performance using CTE

2012-11-23 Thread Gavin Flower
On 22/11/12 04:32, Andres Freund wrote: On 2012-11-21 10:21:16 -0500, Andrew Dunstan wrote: On 11/21/2012 09:59 AM, Tom Lane wrote: Andrew Dunstan writes: If we're going to do it can we please come up with something more intuitive and much, much more documented than "OFFSET 0"? And if/when we