Re: Functional index performance question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Arguile <arguile(at)lucentstudios(dot)com>
Cc: Mike Mascari <mascarm(at)mascari(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Functional index performance question
Date: 2003-09-30 14:27:08
Message-ID: 19258.1064932028@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Arguile <arguile(at)lucentstudios(dot)com> writes:
> On Tue, 2003-09-30 at 07:06, Mike Mascari wrote:
>> SELECT lower(name)
>> FROM employees
>> WHERE lower(name) = 'mike'
>>
>> will PostgreSQL re-evaluate lower(name)? Is it necessary?

> No, it won't re-evaluate.

I think he's asking whether the lower(name) appearing in the output list
will be separately evaluated. Which it will be. There's not presently
any code that looks for common subexpressions.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Arguile 2003-09-30 14:30:25 Re: Functional index performance question
Previous Message Tom Lane 2003-09-30 14:24:18 Re: [postgis-users] Union as an aggregate