Re: Query with "ILIKE ALL" does not use the index
От
Nicolas Even
Тема
Re: Query with "ILIKE ALL" does not use the index
Дата
Msg-id
CALghGHMbrs224QWfDojiA4guDdyoctFVv4YkfAnMi8sW0eAinw@mail.gmail.com
Ответ на
Re: Query with "ILIKE ALL" does not use the index (Matthew Hall)
Список
Дерево обсуждения
Query with "ILIKE ALL" does not use the index Nicolas Even <neven@ztel.org>
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 Matthew Hall <mhall@mhcomputing.net>
Re: Query with "ILIKE ALL" does not use the index Nicolas Even <neven@ztel.org>
Re: Query with "ILIKE ALL" does not use the index Nicolas Even <neven@ztel.org>
Hi Matthew, I finally used "WHERE name ILIKE arr[1] AND name ILIKE ALL(arr)" which works well enough for my use case. Thank you Nicolas On 26 July 2018 at 19:22, Matthew Hall wrote: > On Jul 26, 2018, at 9:44 AM, Tom Lane wrote: >> >> Nicolas Even 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 по дате отправления