Re: Unclamped row estimates whith OR-ed subplans

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Unclamped row estimates whith OR-ed subplans
Дата
Msg-id CAKFQuwazEdPX7VmkAosCs=d1WK2+HFOzJhi9OVxdzf9aj7BPxg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Unclamped row estimates whith OR-ed subplans  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-performance
On Friday, June 19, 2020, Laurenz Albe <laurenz.albe@cybertec.at> wrote:

> I am absolutely aware that those are hashed sub plans below a seqscan and that Postgres therefore has to scan all tuples of the table. But the problem is that upper nodes (which are excluded from
> this example for simplicity) think they will receive 1301316 rows from the seqscan, when in fact they will probably only see a hand full, which the planner could have (easily?) deduced by taking the
> greater of the two subplan row estimates.
>
> What am I missing, or is this perhaps a shortfall of the planner?

The subplans are executed *fpr each row* found in "transactions",
and the estimate on the subplans is *per execution".

I understood Tom’s nearby answer but not this one.  This seems to be referring to correlated subplans which the examples are not.

David J.
 

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Unclamped row estimates whith OR-ed subplans
Следующее
От: "Benjamin Coutu"
Дата:
Сообщение: Re: Unclamped row estimates whith OR-ed subplans