Re: CTE optimization fence on the todo list?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: CTE optimization fence on the todo list?
Date: 2015-05-01 23:24:33
Message-ID: 55440B31.3080204@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2015-05-01 23:29:15 Re: CTE optimization fence on the todo list?
Previous Message Jim Nasby 2015-05-01 23:10:31 Re: Improving replay of XLOG_BTREE_VACUUM records