Re: LIKE and REGEX optimization

From: Richard Huxton <dev(at)archonet(dot)com>
To: Chris Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: LIKE and REGEX optimization
Date: 2008-01-16 09:40:39
Message-ID: 478DD117.9080102@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Chris Browne wrote:
> The only idea that comes to mind to follow that is to look into
> tsearch. On PostgreSQL 8.3, it's built in; on 8.2 and earlier, it's a
> "contrib" module. It allows indexing on words inside columns, which
> would seem to fit your requirement.

You might want to google for "postgresql trigram" too. Some notes at the
location below.
http://www.sai.msu.su/~megera/oddmuse/index.cgi/ReadmeTrgm

It's more of a substring search than tsearch2 is, so might meet your
needs better. It's in the "contrib" package / source directory.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2008-01-16 09:48:50 Re: backup and restore
Previous Message Richard Huxton 2008-01-16 09:34:06 Re: backup and restore