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-inli

Re: CTE optimization fence

2018-06-26 Thread Rob Sargent
scussion 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? >> >

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 anyon

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 > consi

CTE optimization fence

2018-06-26 Thread Guy Burgess
ence in PG. Unfortunately due to the application I'm dealing with, converting all CTE queries to subquery model is not feasible. Plus, the readability of CTE is a big bonus. I see there was some discussion last year about removing the CTE optimization fence (e.g. http://www.postgresql-archive.o