Hi, > * We approximate "never vacuumed" by "has relpages = 0", which > * means this will also fire on genuinely empty relations. Not > * great, but fortunately that's a seldom-seen case in the real > * world, and it shouldn't degrade the quality of the plan too > * much anyway to err in this direction. > */ > if (curpages < 10 && rel->rd_rel->relpages == 0) > curpages = 10; > > > commenting that two lines make the estimates correct. now that we have > plan invalidation that hack is still needed? > i know that as the comment suggest this has no serious impact but > certainly this is user visible.
I guess the reason is that a 0 estimate for a non empty table which was analyzed before the data was inserted and not yet analyzed again could cause much more troubles... anyway, I was just curious to get an "official" anwser ;) Cheers -- Matteo Beccati OpenX - http://www.openx.org -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers