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

From Chris Rogers
Subject Re: CTE optimization fence on the todo list?
Date
Msg-id CAPo4y_Wt8CdvbLnnEMCERwn76AEmbOKuyYvYCn1Jc+rUqLxS1w@mail.gmail.com
Whole thread Raw
In response to Re: CTE optimization fence on the todo list?  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: CTE optimization fence on the todo list?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
<div dir="ltr">I need this feature a lot.  Can anyone point me to a place in the code where I can hack together a
quick-and-dirty,compatibility-breaking implementation?  Thanks!<br /></div><div class="gmail_extra"><br /><div
class="gmail_quote">OnSun, May 3, 2015 at 10:03 PM, Jim Nasby <span dir="ltr"><<a
href="mailto:Jim.Nasby@bluetreble.com"target="_blank">Jim.Nasby@bluetreble.com</a>></span> wrote:<br /><blockquote
class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 5/3/15 11:59
AM,Andrew Dunstan wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex"><br/> On 05/03/2015 11:49 AM, Tom Lane wrote:<br /><blockquote class="gmail_quote"
style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Andrew Dunstan <<a
href="mailto:andrew@dunslane.net"target="_blank">andrew@dunslane.net</a>> writes:<br /><blockquote
class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On 05/01/2015 07:24 PM, Josh
Berkuswrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex"><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">(A possible compromise position would be to offer a new GUC to<br /> enable/disable the
optimizationglobally; that would add only a<br /> reasonably<br /> small amount of control code, and people who were
afraidof the change<br /> breaking their apps would probably want a global disable anyway.)<br
/></blockquote></blockquote>This could be a very bad, almost impossible to catch, behaviour break.<br /> Even if we add
theGUC, we're probably going to be imposing very<br /> significant code audit costs on some users.<br /></blockquote>
Onwhat grounds do you claim it'd be a behavior break?  It's possible<br /> that the subquery flattening would result in
less-desirableplans not<br /> more-desirable ones, but the results should still be correct.<br /></blockquote><br /> I
meantw.r.t. performance. Sorry if that wasn't clear.<br /></blockquote><br /></span> To put this in perspective... I've
seenthings like this take query runtime from minutes to multiple hours or worse; bad enough that "behavior break"
becomesa valid description.<br /><br /> We definitely need to highlight this in the release notes, and I think the GUC
wouldbe mandatory.<span class="im HOEnZb"><br /> -- <br /> Jim Nasby, Data Architect, Blue Treble Consulting<br /> Data
inTrouble? Get it in Treble! <a href="http://BlueTreble.com" target="_blank">http://BlueTreble.com</a><br /><br /><br
/></span><divclass="HOEnZb"><div class="h5"> -- <br /> Sent via pgsql-hackers mailing list (<a
href="mailto:pgsql-hackers@postgresql.org"target="_blank">pgsql-hackers@postgresql.org</a>)<br /> To make changes to
yoursubscription:<br /><a href="http://www.postgresql.org/mailpref/pgsql-hackers"
target="_blank">http://www.postgresql.org/mailpref/pgsql-hackers</a><br/></div></div></blockquote></div><br /></div> 

pgsql-hackers by date:

Previous
From: Euler Taveira
Date:
Subject: small typo
Next
From: Jim Nasby
Date:
Subject: Re: Change pg_cancel_*() to ignore current backend