Re: Plan not skipping unnecessary inner join

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Re: Plan not skipping unnecessary inner join
Дата
Msg-id CAEudQApPBa1BDcktwY3oc6hvRNs9hrHJNALfcJUc7gHvbhZ7fw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Plan not skipping unnecessary inner join  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-performance
Em dom., 17 de mai. de 2020 às 10:31, Justin Pryzby <pryzby@telsasoft.com> escreveu:
On Sun, May 17, 2020 at 09:32:47AM -0300, Ranier Vilela wrote:
> I redid the same tests with vanila postgres and with empty tables.
> I'm surprised, why does the plan have 2550 rows in explain?

That's the *estimated* rowcount.

The planner tends to ignore table statistics which say the table is empty,
since that can lead to a terrible plan if it's not true (stats are out of date
or autovacuum threshold not hit).
Thanks for the explanation.

regards,
Ranier Vilela

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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: Plan not skipping unnecessary inner join
Следующее
От: A Guy Named Ryan
Дата:
Сообщение: Execution time from >1s -> 80m+ when extra columns added in SELECTfor sub-query