Re: Improving N-Distinct estimation by ANALYZE

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Improving N-Distinct estimation by ANALYZE
Дата
Msg-id 43BCBC87.3050108@agliodbs.com
обсуждение исходный текст
Ответ на Re: Improving N-Distinct estimation by ANALYZE  (Greg Stark <gsstark@mit.edu>)
Ответы Re: Improving N-Distinct estimation by ANALYZE  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Greg,

> Only if your sample is random and independent. The existing mechanism tries
> fairly hard to ensure that every record has an equal chance of being selected.
> If you read the entire block and not appropriate samples then you'll introduce
> systematic sampling errors. For example, if you read an entire block you'll be
> biasing towards smaller records.

Did you read any of the papers on block-based sampling?   These sorts of 
issues are specifically addressed in the algorithms.

--Josh


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Improving N-Distinct estimation by ANALYZE
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Improving N-Distinct estimation by ANALYZE