| От | Tom Lane |
|---|---|
| Тема | Re: Statistics on a table |
| Дата | |
| Msg-id | 28754.1057732369@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Statistics on a table (Stephan Szabo <sszabo@megazone23.bigpanda.com>) |
| Список | pgsql-general |
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
>> statistic ( n_distinct in particular) records for one of my columns,
>> greatly under calculated it saying:
>> 49726, but in reality 33409816.
>> is it any way how I can improve that?
> You might see if raising the statistics target with ALTER TABLE ALTER
> COLUMN followed by an analyze helps getting reasonable values any. Maybe
> try a few thousand?
That seems like a big jump, considering the default is only 10. Try
setting it to 100 (then re-ANALYZE, then check the plan). If that
doesn't work, try more. I'd be interested to see what it takes to
get the estimate closer to reality.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера