From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Benoit Delbosc <bdelbosc(at)nuxeo(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Slow fulltext query plan |
Date: | 2012-04-14 01:16:43 |
Message-ID: | 772.1334366203@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Benoit Delbosc <bdelbosc(at)nuxeo(dot)com> 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('whatever') @@ nx_to_tsvector(fulltext.fulltext))
>> OR (TO_TSQUERY('whatever') @@ nx_to_tsvector(fulltext.fulltext_title));
> This query is written by a framework, also I thought that is a common
> pattern that can be found in the documentation:
> http://www.postgresql.org/docs/9.1/interactive/textsearch-controls.html
Well, "common pattern" would be stretching it. Anyway I've concluded
that this is in fact a planner bug. There will be a fix in 9.2, but I'm
not going to take the risk of back-patching it, so you might want to
think about changing that framework.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Eyal Wilde | 2012-04-15 12:43:27 | Re: scale up (postgresql vs mssql) |
Previous Message | Claudio Freire | 2012-04-13 17:52:45 | Re: scale up (postgresql vs mssql) |