On Thu, Mar 3, 2016 at 10:16 PM, Tomas Vondra <tomas.von...@2ndquadrant.com> wrote:
> So yes, each estimator works great for exactly the opposite cases. But > notice that typically, the results of the new formula is much higher than > the old one, sometimes by two orders of magnitude (and it shouldn't be > difficult to construct examples of much higher differences). > > The table also includes the 'average' estimator you propose, but it's > rather obvious that the result is always much closer to the new value, > simply because > > (small number) + (huge number) > ------------------------------ > 2 > > is always much closer to the huge number. We're usually quite happy when > the estimates are within the same order of magnitude, so whether it's K or > K/2 makes pretty much no difference. I believe that Mark means geometrical average, i.e. sqrt((small number) * (huge number)). ------ Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company