Re: Expression Pruning in postgress

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: HarmeekSingh Bedi <harmeeksingh(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Expression Pruning in postgress
Date: 2011-07-07 14:24:49
Message-ID: 29948.1310048689@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

HarmeekSingh Bedi <harmeeksingh(at)gmail(dot)com> writes:
> In a plan where Node 1 is parent {say join) and Node 2 is child
> (say scan) . If node 1 has a expression say foo(column) then scan
> will project 'column' for sure and join will
> evaluate foo(column). Now if the node above join does not need
> column ? how does postgress remove the column from join's projection
> list .

See build_joinrel_tlist() in relnode.c.

> I am seeing that it does not in many
> cases specially when sort appears above.

Please show a concrete example.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2011-07-07 14:44:06 Re: Review of VS 2010 support patches
Previous Message Tom Lane 2011-07-07 14:22:28 Re: Crash dumps