Re: [PERFORM] [GENERAL] Slow TSearch2 performance for table with 1 million documents.

2007-10-11 Thread Benjamin Arai
It appears that the ORDER BY rank operation is the slowing factor. If I remove it then the query is pretty fast. Is there another way to perform ORDER BY such that it does not do a sort? Benjamin On Oct 5, 2007, at 3:57 PM, Benjamin Arai wrote: On Oct 5, 2007, at 8:32 AM, Oleg Bartunov

Re: [PERFORM] [GENERAL] Slow TSearch2 performance for table with 1 million documents.

2007-10-11 Thread Tom Lane
Benjamin Arai [EMAIL PROTECTED] writes: It appears that the ORDER BY rank operation is the slowing factor. If I remove it then the query is pretty fast. Is there another way to perform ORDER BY such that it does not do a sort? I think you misunderstood: it's not the sort that's slow,

Re: [PERFORM] [GENERAL] Slow TSearch2 performance for table with 1 million documents.

2007-10-11 Thread Benjamin Arai
Oh, I see. I didn't look carefully at the EXPLAIN ANALYZE I posted. So, is there a solution to the rank problem? Benjamin On Oct 11, 2007, at 8:53 AM, Tom Lane wrote: Benjamin Arai [EMAIL PROTECTED] writes: It appears that the ORDER BY rank operation is the slowing factor. If I remove it

Re: [PERFORM] [GENERAL] Slow TSearch2 performance for table with 1 million documents.

2007-10-05 Thread Oleg Bartunov
On Fri, 5 Oct 2007, Tom Lane wrote: Benjamin Arai [EMAIL PROTECTED] writes: # explain analyze select * FROM fulltext_article, to_tsquery ('simple','dog') AS q WHERE idxfti @@ q ORDER BY rank(idxfti, q) DESC; QUERY PLAN

Re: [PERFORM] [GENERAL] Slow TSearch2 performance for table with 1 million documents.

2007-10-05 Thread Benjamin Arai
On Oct 5, 2007, at 8:32 AM, Oleg Bartunov wrote: On Fri, 5 Oct 2007, Tom Lane wrote: Benjamin Arai [EMAIL PROTECTED] writes: # explain analyze select * FROM fulltext_article, to_tsquery ('simple','dog') AS q WHERE idxfti @@ q ORDER BY rank(idxfti, q) DESC; QUERY PLAN