On Tue, Jul 8, 2014 at 3:47 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> AFAICS, the eight
> un-removed joins are either joining to non-unique keys, or can't be
> removed because their tables are needed to provide joining columns for
> un-removable joins.
>
My point is that even if the column to which we are joining is a non-unique
key, there should be no need to look at that table if the output does not
include any values from that table, and there are no filters on that
table's values, and all output columns are in the GROUP BY. Is the planner
not smart enough to notice this?
Moshe Jacobson
Manager of Systems Engineering, Nead Werx Inc. <http://www.neadwerx.com>
2323 Cumberland Parkway =C2=B7 Suite 201 =C2=B7 Atlanta, GA 30339
"Quality is not an act, it is a habit." -- Aristotle