Re: Vacuum, analyze, and setting reltuples of pg_class

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Vacuum, analyze, and setting reltuples of pg_class
Дата
Msg-id 11898.1166046047@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Vacuum, analyze, and setting reltuples of pg_class  ("Jim C. Nasby" <jim@nasby.net>)
Ответы Re: Vacuum, analyze, and setting reltuples of pg_class  ("Zeugswetter Andreas ADI SD" <ZeugswetterA@spardat.at>)
Список pgsql-hackers
"Jim C. Nasby" <jim@nasby.net> writes:
> On Mon, Dec 11, 2006 at 12:08:30PM -0500, Tom Lane wrote:
>> "Greg Sabino Mullane" <greg@turnstep.com> writes:
>>> Short version: is it optimal for vacuum to always populate reltuples
>>> with live rows + dead rows?
>> 
>> If we didn't do that, it would tend to encourage the use of seqscans on
>> tables with lots of dead rows, which is probably a bad thing.

> So then why does vacuum do that? ISTM that it makes more sense for it to
> act the same as analyze and only count live rows.

I think what you misread what I said: it's better to have the larger
count in reltuples so that the planner won't try to use a seqscan when
there are, say, 3 live tuples and 100K dead ones.  The real problem is
that analyze ought to act more like vacuum, but since it presently
ignores deaders altogether, it fails to.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Better management of mergejoinable operators
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Operator class group proposal