Re: Optimizing a complex query (long)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Paulo Jan <admin(at)mail(dot)ddnet(dot)es>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Optimizing a complex query (long)
Date: 2001-10-26 20:09:50
Message-ID: 27965.1004126990@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Paulo Jan <admin(at)mail(dot)ddnet(dot)es> writes:
> The problem that I'm having is that the
> search on text fields is too slow,

The only way to make that acceptably fast is to build an index designed
specially for text searches. A simple index will only help for queries
like field = 'foo', not field ~ 'foo'.

The contrib/fti module is one possible approach (a rather inelegant one,
but a lot of people are using it). In 7.2 there will be a new
contrib/tsearch module that is allegedly better, though I haven't
played with it myself. If fti seems too grotty you might want to
download the new 7.2 beta release to try out.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Eric Ridge 2001-10-26 20:58:47 Re: Sorting by parent/child relationships
Previous Message Seth Hettich 2001-10-26 20:09:28 Re: initdb segfault - solaris 8