Re: optimizing constant quals within outer joins

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: optimizing constant quals within outer joins
Дата
Msg-id 18508.1151794519@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: optimizing constant quals within outer joins  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: optimizing constant quals within outer joins  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> I note that the rowcount is not altered by the one-time filter.  Is this
> an issue?  I imagine the problem is not being able to estimate the
> number of rows that pass the filter.

That's intentional.  The filter is either going to pass all or none of
the rows, not some fraction of them.  It clearly isn't very reasonable
to guess that it will pass none of them (except if the qual is actually
constant FALSE).

> I also wonder whether it wouldn't be better in this case to apply each
> filter to each arm of the merge join.

Uh, why?  For the most part, I'd think the higher you can put the filter
in the plan tree, the better.
        regards, tom lane


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: optimizing constant quals within outer joins
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: optimizing constant quals within outer joins