Re: optimising UNION performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alban Hertroys <alban(at)magproductions(dot)nl>
Cc: Rafal Pietrak <rafal(at)zorro(dot)isa-geek(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: optimising UNION performance
Date: 2006-08-28 14:46:34
Message-ID: 27811.1156776394@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alban Hertroys <alban(at)magproductions(dot)nl> writes:
> There's practically no difference between SELECT 1 FROM ... and SELECT *
> FROM ...; the only added costs (AFAIK) are for actually fetching the
> column values and such. Pretty cheap operations.

You're both glossing over exactly the wrong thing, particularly seeing
that Rafal appears to be using 8.0 or older which hasn't got 8.1's
significant reductions in targetlist evaluation costs.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-08-28 15:16:15 Re: Perl language creation failed
Previous Message Harpreet Dhaliwal 2006-08-28 14:42:12 Re: Perl language creation failed