Re: Efficient String searching - Mailing list pgsql-admin

From Stephan Szabo
Subject Re: Efficient String searching
Date
Msg-id Pine.BSF.4.21.0109251041010.10402-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Efficient String searching  (Robert.Farrugia@go.com.mt)
Responses Re: Efficient String searching
List pgsql-admin
On Tue, 25 Sep 2001 Robert.Farrugia@go.com.mt wrote:

> Hi,
>
> I have the following problem.  When doing string searches using the ilike
> command, no indexes are being used.  This is giving performance problems,
> whereas it takes longer to sequentially search the whole table.  Am i
> missing something about searching for strings ?  Are there any efficient
> methods than using regular expressions or like ?

Unless your pattern is anchored at the start, indexes don't get used.  In
addition, if you're in a locale other than C, indexes don't get used.
It depends on the kind of string searches you're doing.  If you're looking
for words in a longer string, you probably want to look at a full text
indexing solution.  IIRC, there's one in contrib and a few others made by
people on the lists.


pgsql-admin by date:

Previous
From: "Rob Gore"
Date:
Subject: installation on RedHat 6.2
Next
From: "Ted Rolle"
Date:
Subject: Re: installation on Redhat 6.2