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

Поиск
Список
Период
Сортировка
От Denis Papathanasiou
Тема Re: Differences between to_tsquery() and plainto_tsquery() when it comes to applying an index?
Дата
Msg-id 4C76A2B1.2050908@gmail.com
обсуждение исходный текст
Ответ на Re: Differences between to_tsquery() and plainto_tsquery() when it comes to applying an index?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Differences between to_tsquery() and plainto_tsquery() when it comes to applying an index?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
> That index doesn't match the query, so it can't be used.  Try
>
> select item_pk from node where
> tag='primaryIssuer.entityType' and
> to_tsvector('english', val) @@ plainto_tsquery('Limited Partnership');

Tom and Oleg: thank you for clarifying this.

I see where I made the mistake in applying the example from the
documentation.

> Note that seeing that the scan on the other index is pretty cheap,
> it's not obvious that indexing the @@ clause is better anyway.

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?

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

Предыдущее
От: "Michael P. Soulier"
Дата:
Сообщение: Re: looping on NEW and OLD in a trigger
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Differences between to_tsquery() and plainto_tsquery() when it comes to applying an index?