Re: What index for 'like (%keyword%)' ??? - Mailing list pgsql-performance

From Richard Huxton
Subject Re: What index for 'like (%keyword%)' ???
Date
Msg-id 200403311307.54680.dev@archonet.com
Whole thread Raw
In response to What index for 'like (%keyword%)' ???  ("Priem, Alexander" <ap@cict.nl>)
List pgsql-performance
On Wednesday 31 March 2004 10:51, Priem, Alexander wrote:
> Hi everyone,
>
> I am building a query which uses a clause like "Where doc_description like
> '%keyword%'". I know a normal index won't be of any use here, but since the
> table in question will get fairly big, I do want to use an index.
>
> Can anyone give me some advise on what kind of index I can use here? Or
> shouldn't I use one in this case?

You probably want to look at the contrib/tsearch2 full-text indexing module.

--
  Richard Huxton
  Archonet Ltd

pgsql-performance by date:

Previous
From: "Priem, Alexander"
Date:
Subject: What index for 'like (%keyword%)' ???
Next
From: "Jaime Casanova"
Date:
Subject: Re: select slow?