Re: Calculation of unused columns

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Calculation of unused columns
Date: 2009-10-18 23:41:38
Message-ID: 14664.1255909298@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> It's probably true that in MOST of the cases where this comes up, the
> subquery can be flattened, from_collapse_limit permitting. But I
> think there are other cases, too.

Right ... and from_collapse_limit is not relevant here; only the form of
the subquery is. So I'd sure like to see some actual use cases before
we decide to expend planning cycles on this.

Just for fun, I hacked together a first cut at this. It's only about
120 lines but it's a bit cheesy (the limitation to not handling
appendrel members in particular). It passes regression tests and
seems to do what's wanted, but I'm not convinced it's worth the extra
cycles as-is, let alone with the appendrel limitation fixed.

regards, tom lane

Attachment Content-Type Size
remove_unused_subquery_outputs-1.patch text/x-patch 5.6 KB

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Haas 2009-10-19 00:49:42 Re: Improving join performance over multiple moderately wide tables
Previous Message Robert Haas 2009-10-18 22:26:58 Re: Calculation of unused columns