case insensitive search in a column - Mailing list pgsql-interfaces

From Roland Dirlewanger
Subject case insensitive search in a column
Date
Msg-id 374AB7A6.D6C313D0@dr15.cnrs.fr
Whole thread Raw
Responses Re: [INTERFACES] case insensitive search in a column
List pgsql-interfaces
Hope the following problem is related enough to interfaces  ...

I'm looking for the most efficient way to look through a PGSQL database
with a case insensitive search.

I tried the following queries :
1. select * from mybase where myattr like 'word%';
2. select * from mybase where myattr ~* '^word';

The first one is case-sensitive. The second one matches my needs but is
about 5 or 6 times slower than the first one.

Before I start to convert the whole database in either lowercase or
uppercase, is there a way to fasten up case insensitive searches for
words a the begining of a column or even in the middle of a row ?

Thanks a lot in advance for your help.

--
Roland Dirlewanger
CNRS - Délégation Aquitaine et Poitou-Charentes
Esplanade des Arts et Métiers
33402 TALENCE CEDEX

Mél : rd@dr15.cnrs.fr, Tél : 05.57.35.58.52, Fax : 05.57.35.58.01



pgsql-interfaces by date:

Previous
From: "Wheeler, Alfred"
Date:
Subject: unsubscribe pgsql-interfaces
Next
From: tperry@grumpy.it.as.ex.state.ut.us
Date:
Subject: ...