Functional index performance question

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Functional index performance question
Date: 2003-09-30 11:06:49
Message-ID: 3F7963C9.6040605@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Let's assume I have a table like so:

CREATE TABLE employees (
employeeid text not null,
name text not null
);

CREATE INDEX i_employees ON employees(lower(name));

Let's also assume that the lower() function is computationally
expensive. Now if I have a query like:

SELECT lower(name)
FROM employees
WHERE lower(name) = 'mike'

will PostgreSQL re-evaluate lower(name)? Is it necessary?

Mike Mascari
mascarm(at)mascari(dot)com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2003-09-30 11:11:57 Re: Problem with lock?
Previous Message Bjørn T Johansen 2003-09-30 10:43:50 Re: Problem with lock?