tsearch 2 query

From: "Matthew Terenzio" <mterenzio(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: tsearch 2 query
Date: 2008-10-02 14:36:55
Message-ID: 852b23f40810020736k2ebec249n67bf1509dfe7e939@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

There are less than 20,000 records being searched here, but the query takes
several minutes.

I know this may not be enough info, but would one suggest I optimize the
query or put my attention towards other areas.

SELECT id,date,headline as head,headline(body,q),rank(vectors,q),timestamp
FROM stories,to_tsquery('$query') AS q WHERE vectors @@ q ORDER BY $sort
DESC OFFSET $offset LIMIT 20

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Neyman 2008-10-02 14:46:29 Re: That was easy
Previous Message Matthew Terenzio 2008-10-02 14:28:55 tsearch2 query