Re: Slow fulltext query plan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Slow fulltext query plan
Дата
Msg-id 6273.1334269559@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Slow fulltext query plan  (Benoit Delbosc <bdelbosc@nuxeo.com>)
Ответы Re: Slow fulltext query plan  (Benoit Delbosc <bdelbosc@nuxeo.com>)
Список pgsql-performance
Benoit Delbosc <bdelbosc@nuxeo.com> 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(fulltext.fulltext_title));

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));

?

            regards, tom lane

В списке pgsql-performance по дате отправления:

Предыдущее
От: Benoit Delbosc
Дата:
Сообщение: Slow fulltext query plan
Следующее
От: Benoit Delbosc
Дата:
Сообщение: Re: Slow fulltext query plan