Re: ANALYZE to be ignored by VACUUM

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема Re: ANALYZE to be ignored by VACUUM
Дата
Msg-id 20080220130529.6387.52131E4D@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Re: ANALYZE to be ignored by VACUUM  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Gregory Stark <stark@enterprisedb.com> wrote:

> > 4. ANALYZE finishes in a short time.
> There was a paper with a nice algorithm posted a while back which required
> only constant memory but it depended on scanning the entire table. I think to
> do n_distinct estimates we'll need some statistics which are either gathered
> opportunistically whenever a seqscan happens or maintained by an index.

VACUUM would be another good timing for the alogrithm, because it does
a seqscan. If we do so, we need to separate an analyzing transaction
into sampling and updating-stats transactions to keep vacuums as
ignorable transactions.

However, VACUUM will not do a seqscan when we have Dead Space Map or
Segment Visibility Map. We will need incremental statistics updating
if reliable n_distinct estimation requires many samples.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center




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

Предыдущее
От: Luke Lonergan
Дата:
Сообщение: Re: 8.3 / 8.2.6 restore comparison
Следующее
От: Robert Treat
Дата:
Сообщение: Re: Permanent settings