Re: Easy question

From: Chris <dmagick(at)gmail(dot)com>
To: Bert <clemens(dot)bertschler(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Easy question
Date: 2006-05-03 06:21:23
Message-ID: 44584BE3.7020403@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Magnus Hagander 2006-05-03 07:29:15 Re: Performance Issues on Opteron Dual Core
Previous Message Gregory Stewart 2006-05-03 04:27:02 Re: Performance Issues on Opteron Dual Core