Re: Optimizer showing wrong rows in plan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Optimizer showing wrong rows in plan
Дата
Msg-id 22618.1269793661@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Optimizer showing wrong rows in plan  (Tadipathri Raghu <traghu.dba@gmail.com>)
Ответы Re: Optimizer showing wrong rows in plan  (Jeremy Harris <jgh@wizmail.org>)
Список pgsql-performance
Tadipathri Raghu <traghu.dba@gmail.com> writes:
> Frankly speaking its a newly created table without any operation on it as
> you have seen the example. Then how come it showing those many rows where we
> have only one in it.

Yes.  This is intentional: the size estimates for a never-yet-analyzed
table are *not* zero.  This is because people frequently create and load
up a table and then immediately query it without an explicit ANALYZE.
The quality of the plans you'd get at that point (especially for joins)
would be spectacularly bad if the default assumption were that the table
was very small.

            regards, tom lane

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

Предыдущее
От: Gary Doades
Дата:
Сообщение: Re: Optimizer showing wrong rows in plan
Следующее
От: Jeremy Harris
Дата:
Сообщение: Re: Optimizer showing wrong rows in plan