Re: Query with "ILIKE ALL" does not use the index

Поиск
Список
Период
Сортировка
От Matthew Hall
Тема Re: Query with "ILIKE ALL" does not use the index
Дата
Msg-id 460B4CB5-0D1D-43C8-829B-D7734A84779D@mhcomputing.net
обсуждение исходный текст
Ответ на Re: Query with "ILIKE ALL" does not use the index  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Query with "ILIKE ALL" does not use the index  (Nicolas Even <neven@ztel.org>)
Список pgsql-performance
On Jul 26, 2018, at 9:44 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Nicolas Even <neven@ztel.org> writes:
>> However when I run the same (as far as I understand it) query but with
>> the ALL operator, the index is not used:
>> explain analyze select name from totoz where name ilike all(array['%tot%']);
>
> There's only index support for "op ANY (array)", not "op ALL (array)".
>
>             regards, tom lane

Nicolas,

Could you work around the limitation with a two-clause WHERE?

First clause ANY, second clause ALL.

I've done some similar tricks on similar sorts of queries.

Matthew.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Query with "ILIKE ALL" does not use the index
Следующее
От: Nicolas Even
Дата:
Сообщение: Re: Query with "ILIKE ALL" does not use the index