Re: CTE optimization fence on the todo list? - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: CTE optimization fence on the todo list?
Date
Msg-id 55440B31.3080204@agliodbs.com
Whole thread Raw
In response to Re: CTE optimization fence on the todo list?  (Chris Rogers <teukros@gmail.com>)
Responses Re: CTE optimization fence on the todo list?
List pgsql-hackers
On 05/01/2015 03:30 PM, Tom Lane wrote:
> Assuming that that sketch is accurate, it would take more code to provide
> a new user-visible knob to enable/disable the behavior than it would to
> implement the optimization, which makes me pretty much -1 on providing
> such a knob.  We should either do it or not.  If we do, people who want
> optimization fences should use the traditional "OFFSET 0" hack.

Yes.

> 
> (A possible compromise position would be to offer a new GUC to
> enable/disable the optimization globally; that would add only a reasonably
> small amount of control code, and people who were afraid of the change
> breaking their apps would probably want a global disable anyway.)

We'd need the GUC.  I know of a lot of cases where people are using WITH
clauses specifically to override the query planner, and requiring them
to edit all of their queries in order to enable the old behavior would
become an upgrade barrier.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Improving replay of XLOG_BTREE_VACUUM records
Next
From: "David G. Johnston"
Date:
Subject: Re: CTE optimization fence on the todo list?