Re: [HACKERS] Bad n_distinct estimation; hacks suggested?
В списке pgsql-performance по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: [HACKERS] Bad n_distinct estimation; hacks suggested? |
| Дата | |
| Msg-id | 19276.1114442580@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Bad n_distinct estimation; hacks suggested? (Simon Riggs <simon@2ndquadrant.com>) |
| Ответы |
Re: [HACKERS] Bad n_distinct estimation; hacks suggested?
|
| Список | pgsql-performance |
Simon Riggs <simon@2ndquadrant.com> writes:
> My suggested hack for PostgreSQL is to have an option to *not* sample,
> just to scan the whole table and find n_distinct accurately.
> ...
> What price a single scan of a table, however large, when incorrect
> statistics could force scans and sorts to occur when they aren't
> actually needed ?
It's not just the scan --- you also have to sort, or something like
that, if you want to count distinct values. I doubt anyone is really
going to consider this a feasible answer for large tables.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера