Re: Planning time grows exponentially with levels of nested views

2021-07-06 Thread Tom Lane
Dean Rasheed writes: > I took a look at this and wasn't able to find any way to break it, and > your argument that it can't really make such rewriter bugs any worse > makes sense. Thanks for looking! > Would it make sense to update the comment prior to copying the subquery? Yeah, I hadn't touch

Re: Planning time grows exponentially with levels of nested views

2021-07-06 Thread Dean Rasheed
On Sun, 18 Apr 2021 at 21:42, Tom Lane wrote: > > > If multiple references are actually possible then this'd break it. > > I think this patch doesn't make things any worse for such a case though. > If we re-introduced such a bug, the result would be an immediate null > pointer crash while trying t

Re: Planning time grows exponentially with levels of nested views

2021-04-18 Thread Joel Jacobson
On Sun, Apr 18, 2021, at 22:14, Tom Lane wrote: > "Joel Jacobson" mailto:joel%40compiler.org>> writes: > > I assumed the cost for each nested VIEW layer would grow linear, > > but my testing shows it appears to grow exponentially: > > I think it's impossible to avoid less-than-O(N^2) growth on thi

Re: Planning time grows exponentially with levels of nested views

2021-04-18 Thread Tom Lane
I wrote: > If multiple references are actually possible then this'd break it. There > seem to be no such cases in the regression tests though, and I'm having a > hard time wrapping my brain around what would cause it. "git blame" > traces this text to my own commit f44639e1b, which has the log en

Re: Planning time grows exponentially with levels of nested views

2021-04-18 Thread Tom Lane
[ redirecting to -hackers so the cfbot can see it ] "Joel Jacobson" writes: > I assumed the cost for each nested VIEW layer would grow linear, > but my testing shows it appears to grow exponentially: I think it's impossible to avoid less-than-O(N^2) growth on this sort of case. For example, the