Re: About the constant-TRUE clause in reconsider_outer_join_clauses

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: About the constant-TRUE clause in reconsider_outer_join_clauses
Дата
Msg-id 2583984.1679758907@sss.pgh.pa.us
обсуждение исходный текст
Ответ на About the constant-TRUE clause in reconsider_outer_join_clauses  (Richard Guo <guofenglinux@gmail.com>)
Ответы Re: About the constant-TRUE clause in reconsider_outer_join_clauses  (Richard Guo <guofenglinux@gmail.com>)
Список pgsql-hackers
Richard Guo <guofenglinux@gmail.com> writes:
> Should we instead mark the constant-TRUE clause with required_relids
> plus the OJ relid?

I do not think it matters.

> Even if the join does become clauseless, it will end up being an
> unqualified nestloop.  I think the join ordering algorithm will force
> this join to be formed when necessary.

We would find *some* valid plan, but not necessarily a *good* plan.
The point of the dummy clause is to ensure that the join is considered
as soon as possible.  That might not be the ideal join order of course,
but we'll consider it among other join orders and arrive at a cost-based
decision.  With no dummy clause, the join order heuristics would always
delay this join as long as possible; so even if another ordering is
better, we'd not find it.

            regards, tom lane



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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: hio.c does visibilitymap_pin()/IO while holding buffer lock
Следующее
От: Joseph Koshakow
Дата:
Сообщение: Re: Infinite Interval