Re: regression in analyze

Поиск
Список
Период
Сортировка
От Matteo Beccati
Тема Re: regression in analyze
Дата
Msg-id 4913FA6F.8010608@beccati.com
обсуждение исходный текст
Ответ на regression in analyze  ("Jaime Casanova" <jcasanov@systemguards.com.ec>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Robert Haas"
Дата:
Сообщение: Re: array_length()
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Final /contrib cleanup -- yes/no?