On Fri, Sep 30, 2022 at 10:43 AM Robert Haas <robertmh...@gmail.com> wrote: > But it's unnecessary to do this computation at runtime for every separate > unparameterized nested loop: we can do it right here, in a generic > way, for every such loop.
It's not just that the risks are ludicrously high, of course. The potential benefits must *also* be very low. It's both factors, together. > Now, it's true that the actual risk depends on how certain we are of > the estimates for the input rels, but that's difficult to quantify and > I'm not convinced it really matters at all. We're talking about a problem that is fairly unlikely to occur in general, I think -- let's not forget that. These are presumably rare events that nevertheless cause many real practical problems. If we're going to add error bars, why wouldn't we also need error bars for our error bars? > I think we're kind of just making life complicated for ourselves here > by pretending that unparameterized nested loops are part of some > general class of uncertainty problems that we need to worry about. In > some sense, they are, and David Rowley is right to mention the other > one that comes up pretty frequently. But like that list of two is > pretty much the whole list. I think we've talked ourselves into > believing that this problem is much harder than it really is. +1 -- Peter Geoghegan