Re: Differences between to_tsquery() and plainto_tsquery() when it comes to applying an index?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Differences between to_tsquery() and plainto_tsquery() when it comes to applying an index?
Дата
Msg-id 29298.1282843643@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Differences between to_tsquery() and plainto_tsquery() when it comes to applying an index?  (Denis Papathanasiou <denis.papathanasiou@gmail.com>)
Список pgsql-general
Denis Papathanasiou <denis.papathanasiou@gmail.com> writes:
> So is it the case that, as in the documented example, I need to add a
> column of type ts_vector to the table for the index to be most effective?

You can do it either way, depending on what you want the queries to look
like.  One advantage of materializing the tsvector entries in the table
is that the to_tsvector() work doesn't have to be done over again if
the planner decides not to use that index for some reason (for instance,
it thinks the other index is more effective for the particular query).

            regards, tom lane

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

Предыдущее
От: Denis Papathanasiou
Дата:
Сообщение: Re: Differences between to_tsquery() and plainto_tsquery() when it comes to applying an index?
Следующее
От: Matthieu HUIN
Дата:
Сообщение: Re: Weird behavior with custom operators