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?


Reply via email to