Re: Easy question - Mailing list pgsql-performance

From Chris
Subject Re: Easy question
Date
Msg-id 44584BE3.7020403@gmail.com
Whole thread Raw
In response to Re: Easy question  ("Bert" <clemens.bertschler@gmail.com>)
List pgsql-performance
Bert wrote:
> No i didn't defined any indexes for the table, I know the performance
> will increase with an index, but this was not my question. My question
> furthermore belongs to the access mode of the SQL statement.
> Furthermore i do not understand why the Upper function should increase
> the performance.

The index will have entries like:

CHRIS
BERT
JOE

and so on.

If you run a query like:

select * from table where UPPER(name) = 'CHRIS';

It's an easy match.

If you don't create an UPPER index, it has to do a comparison with each
row - so the index can't be used because postgres has to convert the
field to upper and then do the comparison.

--
Postgresql & php tutorials
http://www.designmagick.com/

pgsql-performance by date:

Previous
From: "Gregory Stewart"
Date:
Subject: Re: Performance Issues on Opteron Dual Core
Next
From: "Magnus Hagander"
Date:
Subject: Re: Performance Issues on Opteron Dual Core