Re: What index for 'like (%keyword%)' ???

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Priem, Alexander" <ap(at)cict(dot)nl>, pgsql-performance(at)postgresql(dot)org
Subject: Re: What index for 'like (%keyword%)' ???
Date: 2004-03-31 12:07:54
Message-ID: 200403311307.54680.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jaime Casanova 2004-03-31 14:27:50 Re: select slow?
Previous Message Priem, Alexander 2004-03-31 09:51:02 What index for 'like (%keyword%)' ???