Search Postgresql Archives

Re: How to use Logical Operators in Fulltext Search?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Also OR operator taking time.

--- On Wed, 21/10/09, Gaini Rajeshwar <raja.rajeshwar2006@xxxxxxxxx> wrote:

From: Gaini Rajeshwar <raja.rajeshwar2006@xxxxxxxxx>
Subject: How to use Logical Operators in Fulltext Search?
To: "pgsql-general@xxxxxxxxxxxxxx mailing list" <pgsql-general@xxxxxxxxxxxxxx>
Date: Wednesday, 21 October, 2009, 1:12 PM

Hi All,
 
I am doing a fulltext search something like this:
 
SELECT doc_id FROM docs WHERE tsv_title($$'magnetic induction'$$) OR tsv_body($$'magnetic induction'$$) OR tsv_abstract($$'abstract'$$)
 
It is taking approximately 100 secs to execute.
 
But running the query on individual column something like below is taking just few milliseconds
 
1) SELECT doc_id FROM docs WHERE tsv_title($$'magnetic induction'$$) 
 
2) SELECT doc_id FROM docs WHERE tsv_body($$'magnetic induction'$$)
 
3) SELECT doc_id FROM docs WHERE tsv_abstract($$'magnetic induction'$$)
 
 
All the above queries are taking just few milliseconds, whereas the bigining one taking around 100 secs.
 
Does anyone know, what could be wrong in this? Is this not the way to specify logical operators like AND, OR, NOT ?
 


Now, send attachments up to 25MB with Yahoo! India Mail. Learn how.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux