Re: When can joins be avoided?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: When can joins be avoided?
Дата
Msg-id 1826810.1668696560@sss.pgh.pa.us
обсуждение исходный текст
Ответ на When can joins be avoided?  (Stefan Fehrenbach <stefan.fehrenbach@gmail.com>)
Список pgsql-performance
Stefan Fehrenbach <stefan.fehrenbach@gmail.com> writes:
> I'm interested in the rules that Postgres uses to avoid joins. Are
> these documented somewhere? If I had to look at the source code, where
> would I start?

src/backend/optimizer/plan/analyzejoins.c

> They don't seem to match my intuition about which joins
> could be avoided.

I believe only left joins to single tables can be elided ATM.
It's too hard to prove uniqueness of the join key in more-
complicated cases.

            regards, tom lane



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

Предыдущее
От: Stefan Fehrenbach
Дата:
Сообщение: When can joins be avoided?
Следующее
От: Luca Ferrari
Дата:
Сообщение: why choosing an hash index instead of the btree version even if the cost is lower?