Re: Efficient String searching

From: "Ted Rolle" <ted(at)tvlconn(dot)com>
To: "'Stephan Szabo'" <sszabo(at)megazone23(dot)bigpanda(dot)com>, <Robert(dot)Farrugia(at)go(dot)com(dot)mt>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Efficient String searching
Date: 2001-09-25 18:23:27
Message-ID: 001701c145ef$2c004500$ab00a8c0@ted
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Like an implementation of Boyer-Moore-...?

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org]On Behalf Of Stephan Szabo
Sent: September 25, 2001 10:43 AM
To: Robert(dot)Farrugia(at)go(dot)com(dot)mt
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Efficient String searching

On Tue, 25 Sep 2001 Robert(dot)Farrugia(at)go(dot)com(dot)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.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Chris Ruprecht 2001-09-25 18:30:02 Re: installation on RedHat 6.2
Previous Message Ted Rolle 2001-09-25 18:03:52 Re: installation on Redhat 6.2