@@ to_tsquery help

From: akp geek <akpgeek(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: @@ to_tsquery help
Date: 2011-03-08 21:23:42
Message-ID: AANLkTimRWE8NQRT03v5+gP3YzdyxzvBU1kDzt85Hm0Cy@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all -

I have 2 tables A,B . Can I write a select statement as follows. My query
is running slow ( 7000 ms). I have created gin index on text_col and also
transactionid is PK on both tables. thanks for your help

B has a transactionid and tsvector columns
A has trasactionid and other columns

I have the query as

select b.col1, b.col2
from
b,a
where b.transactionid=a.transactionid
and b.text_col @@ to_tsquery('SOMETEXT')

Regards

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2011-03-09 01:00:34 Re: Using bytea field...
Previous Message Glenn Maynard 2011-03-08 19:29:58 Re: Why count(*) doest use index?