Re: Sv: Re: Sv: Re: CTE optimization fence

2018-06-28 Thread Alvaro Herrera
On 2018-Jun-27, Andreas Joseph Krogh wrote: > I know. I hate the INLINE proposal and hope default-behaviour will be like in > other DBs, inline like sub-query as default. GUC for preserving fence is what > I > hope will happen. I am probably biased ;-) but I like my proposal #1 in this email h

Sv: Re: Sv: Re: CTE optimization fence

2018-06-27 Thread Andreas Joseph Krogh
På onsdag 27. juni 2018 kl. 11:44:05, skrev Adrien NAYRAT < adrien.nay...@anayrat.info >: On 06/27/2018 09:58 AM, Andreas Joseph Krogh wrote: >      > >      > but we have to settle on a way of controlling it. > >     +1 from me. > >     I am running more an

Re: Sv: Re: CTE optimization fence

2018-06-27 Thread Adrien NAYRAT
On 06/27/2018 09:58 AM, Andreas Joseph Krogh wrote: > > but we have to settle on a way of controlling it. +1 from me. I am running more and more into situations where people consider this a bug rather than a feature. FWIW, I think a GUC that switches between the curre

Sv: Re: CTE optimization fence

2018-06-27 Thread Andreas Joseph Krogh
På onsdag 27. juni 2018 kl. 07:45:25, skrev Thomas Kellerer mailto:spam_ea...@gmx.net>>: Tom Lane schrieb am 27.06.2018 um 05:48: >> I see there was some discussion last year about removing the CTE >> optimization fence (e.g. >> http://www.postgresql-archive.org/CTE-inlining-td5958992.html) but

Re: CTE optimization fence

2018-06-26 Thread Rob Sargent
I don’t think the fence analogy works. Try wall (a la Berlin). I count myself amongst those who thought “Ooh this little CTE will garner just what the rest of the query needs”. Only to find the planner didn’t groc that optimization. Is it a matter of deciding to trust the SQLer and runtime ana

Re: CTE optimization fence

2018-06-26 Thread Thomas Kellerer
Tom Lane schrieb am 27.06.2018 um 05:48: >> I see there was some discussion last year about removing the CTE >> optimization fence (e.g. >> http://www.postgresql-archive.org/CTE-inlining-td5958992.html) but can't >> find anything more recent. Does anyone know if this is still under >> considera

Re: CTE optimization fence

2018-06-26 Thread Tom Lane
Guy Burgess writes: > I see there was some discussion last year about removing the CTE > optimization fence (e.g. > http://www.postgresql-archive.org/CTE-inlining-td5958992.html) but can't > find anything more recent. Does anyone know if this is still under > consideration? Nothing's actually