Functional index performance question - Mailing list pgsql-general

From Mike Mascari
Subject Functional index performance question
Date
Msg-id 3F7963C9.6040605@mascari.com
Whole thread Raw
Responses Re: Functional index performance question
List 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@mascari.com


pgsql-general by date:

Previous
From: Bjørn T Johansen
Date:
Subject: Re: Problem with lock?
Next
From: Peter Eisentraut
Date:
Subject: Re: Problem with lock?