Re: Searching for the cause of a bad plan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Searching for the cause of a bad plan
Дата
Msg-id 21582.1190820137@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Searching for the cause of a bad plan  (Csaba Nagy <nagy@ecircle-ag.com>)
Ответы Re: Searching for the cause of a bad plan
Список pgsql-performance
Csaba Nagy <nagy@ecircle-ag.com> writes:
> db=# analyze verbose temp_table_a;
> INFO:  analyzing "public.temp_table_a"
> INFO:  "temp_table_a": scanned 3000 of 655299 pages, containing 1887000 live rows and 0 dead rows; 3000 rows in
sample,412183071 estimated total rows 

Hmm.  So the bottom line here is probably that that's not a big enough
sample to derive a realistic n_distinct value.  Or maybe it is ... how
many values of "a" are there really, and what's the true distribution of
counts?  Do the plan estimates get closer to reality if you set a higher
statistics target?

            regards, tom lane

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

Предыдущее
От: Csaba Nagy
Дата:
Сообщение: Re: Searching for the cause of a bad plan
Следующее
От: pgdba
Дата:
Сообщение: Re: Incorrect row estimates in plan?