Re: using an index with like-operator - Mailing list pgsql-admin

From Marc Mitchell
Subject Re: using an index with like-operator
Date
Msg-id 001801c23188$75427c80$6f01050a@eisolution.com
Whole thread Raw
In response to using an index with like-operator  (Ronny Theunissen <rth@protext.be>)
List pgsql-admin
Been there, done that...

We had this same issue.  You need to initially build your databases with
the correct locale.  See the following:

http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/charset.html#AE
N16601

Response is the requirement to re-initdb with the correct value set for
env_var "LC_COLLATE".  In fact, I suggest to do an initdb without setting
it and you should observe a message during processing stating the LIKE
queries will not support indexing.  Then set the variable and do it again
and observe that you don't receive this message.

As far as we know, you'll have to dump out and then restore your data.

If you are looking for more info, suggest you search Google groups for
"Postgres Like Seq Scan" and you'll see you are in good company.

Marc Mitchell - Senior Application Architect
Enterprise Information Solutions, Inc.
4910 Main Street
Downers Grove, IL 60515
marcm@eisolution.com

----- Original Message -----
From: "Ronny Theunissen" <rth@protext.be>
To: <pgsql-admin@postgresql.org>
Sent: Monday, July 22, 2002 7:35 AM
Subject: [ADMIN] using an index with like-operator


> Hi,
>
> Anyone knows how to enable the usage of indexes in a like-query?
>
> Any help would be appreciated.
> Grts,
> Ronny
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


pgsql-admin by date:

Previous
From: "Thorsten Ottosen"
Date:
Subject: Re: initdb on cygwin
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: usernames and passwords