Re: Projection while performing joins. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Projection while performing joins.
Date
Msg-id 22865.1044942309@sss.pgh.pa.us
Whole thread Raw
In response to Projection while performing joins.  (Anagh Lal <anaghlal2001@yahoo.com>)
Responses Re: Projection while performing joins.
List pgsql-hackers
Anagh Lal <anaghlal2001@yahoo.com> writes:
>  Why do we not just store the attributes required in
> the join (i.e. those in the join qual conditions and
> the ones in the select list) and then perform sorting
> and retrieval on these tuples rather than on the
> possibly larger tuples with more attributes which we
> project out in the end anyway.

We already do --- the scan nodes project out only the needed columns.

At least, that's true in released versions.  Just a few days ago I put
a hack into CVS tip to skip the projection step for a scan node that's
not topmost in the plan.  As you indicate, that's probably a net loss
when there's a Sort node directly above the scan node.  Needs more
thought...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Anagh Lal
Date:
Subject: Projection while performing joins.
Next
From: SAKAIDA Masaaki
Date:
Subject: pgbash-7.3 released