Re: [PERFORM] Slow fulltext query plan

2012-04-16 Thread Florent Guillaume
Tom Lane wrote: > Benoit Delbosc  writes: >>  On 13/04/2012 00:25, Tom Lane wrote: >>>  Is there a reason why you're writing the query in such a >>>  non-straightforward way, rather than just >>> >>>  EXPLAIN ANALYZE SELECT hierarchy.id >>>  FROM hierarchy >>>  JOIN fulltext ON fulltext.id = hierar

Re: [PERFORM] Slow fulltext query plan

2012-04-13 Thread Tom Lane
Benoit Delbosc writes: > On 13/04/2012 00:25, Tom Lane wrote: >> Is there a reason why you're writing the query in such a >> non-straightforward way, rather than just >> >> EXPLAIN ANALYZE SELECT hierarchy.id >> FROM hierarchy >> JOIN fulltext ON fulltext.id = hierarchy.id >> WHERE (TO_TSQUERY('w

Re: [PERFORM] Slow fulltext query plan

2012-04-12 Thread Benoit Delbosc
On 13/04/2012 00:25, Tom Lane wrote: Benoit Delbosc writes: EXPLAIN ANALYZE SELECT hierarchy.id FROM hierarchy JOIN fulltext ON fulltext.id = hierarchy.id, TO_TSQUERY('whatever') query1, TO_TSQUERY('whatever') query2 WHERE (query1 @@ nx_to_tsvector(fulltext.fulltext)) OR

Re: [PERFORM] Slow fulltext query plan

2012-04-12 Thread Tom Lane
Benoit Delbosc writes: >EXPLAIN ANALYZE SELECT hierarchy.id >FROM hierarchy >JOIN fulltext ON fulltext.id = hierarchy.id, >TO_TSQUERY('whatever') query1, >TO_TSQUERY('whatever') query2 >WHERE (query1 @@ nx_to_tsvector(fulltext.fulltext)) OR (query2 @@ > nx_to_tsvector(full

[PERFORM] Slow fulltext query plan

2012-04-12 Thread Benoit Delbosc
Hi, I would like to understand why the following query execution don't use any fulltext indexes and takes more than 300s (using lot of temporary files): EXPLAIN ANALYZE SELECT hierarchy.id FROM hierarchy JOIN fulltext ON fulltext.id = hierarchy.id, TO_TSQUERY('whatever') query1, TO_T