pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris <dmagick@gmail.com>
To: Bert <clemens.bertschler@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Easy question
Date: Wed, 03 May 2006 16:21:23 +1000
Message-ID: <44584BE3.7020403@gmail.com> (raw)
In-Reply-To: <1146355679.311472.57800@u72g2000cwu.googlegroups.com>
References: <1145741653.759727.38970@e56g2000cwe.googlegroups.com>
	<e2lgmr$1ii5$1@news.hub.org>
	<1146101167.724196.253740@v46g2000cwv.googlegroups.com>
	<e9c163070604291453g25f08b86s5c8584670b678b32@mail.gmail.com>
	<1146355679.311472.57800@u72g2000cwu.googlegroups.com>

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/



view thread (8+ messages)

Message-ID: <44584BE3.7020403@gmail.com>
Permalink:  ../44584BE3.7020403@gmail.com/
Also on:    postgresql.org/message-id/44584BE3.7020403@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: dmagick@gmail.com, clemens.bertschler@gmail.com
  Subject: Re: Easy question
  In-Reply-To: <44584BE3.7020403@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox