Re: Should total_pages be calculated after partition pruning and constraint exclusion?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Should total_pages be calculated after partition pruning and constraint exclusion?
Дата
Msg-id 3065.1526415058@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Should total_pages be calculated after partition pruning andconstraint exclusion?  (David Rowley <david.rowley@2ndquadrant.com>)
Ответы Re: Should total_pages be calculated after partition pruning andconstraint exclusion?  (David Rowley <david.rowley@2ndquadrant.com>)
Список pgsql-hackers
David Rowley <david.rowley@2ndquadrant.com> writes:
> It seems quite strange to me that we calculate total_pages before any
> partition pruning and constraint exclusion is performed during
> set_base_rel_sizes(). Wouldn't it be better to wait until after that's
> done so we don't mistakenly count relations we're not going to scan?

> Delaying the calculation until after set_base_rel_sizes() means it's
> still done in time before it's needed in set_base_rel_pathlists().

I think that when this was first done, there was not a separation between
those passes over the rangetable, so that such a simple fix would have
been impossible.

> The attached patch implements the change.

Please add to next CF.  It's a bit late to be doing such things in v11,
IMO.

            regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Postgres 11 release notes
Следующее
От: Robert Haas
Дата:
Сообщение: Re: explain (verbose off, normalized) vs query planid