| От | Tom Lane |
|---|---|
| Тема | Re: Query performance PLEASE HELP |
| Дата | |
| Msg-id | 24304.1044043986@sss.pgh.pa.us обсуждение |
| Ответ на | Query performance PLEASE HELP (Dmitry Tkach <dmitry@openratings.com>) |
| Список | pgsql-general |
Dmitry Tkach <dmitry@openratings.com> writes:
> What does NEGATIVE n_distinct mean (for managed_supplier.duns)? :-)
Fractional estimate --- in particular, -1 means it thinks the column
is unique. tradestyle.duns is not really unique by itself, is it?
> It lies about many things... For example - n_distinct for
> tradestyle.name = 385825 is about 100 times small than the actual number
> (which is a little over 30 million)
It might help to raise the statistics target for these columns and
re-ANALYZE. Try 100 or so instead of the default 10.
However, even with these stats I'd think it would pick up on the
tradestyle.name index as a likely thing to use. What was the
database's locale setting, again?
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера