Eliminating unnecessary left joins

Поиск
Список
Период
Сортировка
От Ottó Havasvölgyi
Тема Eliminating unnecessary left joins
Дата
Msg-id 34608c0c0704061501lb632332l22fa471f118ddea3@mail.gmail.com
обсуждение исходный текст
Ответы Re: Eliminating unnecessary left joins  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,
 
When using views built with left joins, and then querying against these views, there are a lot of join in the plan that are not necessary, because I don't select/use any column of each table in the views every time. Tables that are left joined and never referenced anywhere else in the query  should be removed from the plan. I think this can be done without any other analyzation or catalog lookup, so it is a quite cheap optimization step, and doing it won't influence the result, but the query will run faster.
This way with a complex query against these views usually the half of the join can be eliminated, and the plan will be quite more optimal.
Why left join a table if never used/referenced in the query?
 
How easy is to teach Postgres to this?
 
I would like to help somehow to introduce this feature as soon as possible. What should I do?
 
Thanks,
Otto

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

Предыдущее
От: Zdenek Kotala
Дата:
Сообщение: Re: [PATCHES] Fix for large file support
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] Fix for large file support