| From: | Roland Dirlewanger <rd(at)dr15(dot)cnrs(dot)fr> |
|---|---|
| To: | pgsql-interfaces(at)postgreSQL(dot)org |
| Subject: | case insensitive search in a column |
| Date: | 1999-05-25 14:45:58 |
| Message-ID: | 374AB7A6.D6C313D0@dr15.cnrs.fr |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)dr15(dot)cnrs(dot)fr, Tél : 05.57.35.58.52, Fax : 05.57.35.58.01
| From | Date | Subject | |
|---|---|---|---|
| Next Message | tperry | 1999-05-25 15:23:44 | |
| Previous Message | Wheeler, Alfred | 1999-05-25 14:19:28 | unsubscribe pgsql-interfaces |