Re: LIKE operator and indexes

Поиск
Список
Период
Сортировка
Искать
От
Stephan Szabo
Тема
Re: LIKE operator and indexes
Дата
в 13:02:34
Msg-id
20020531095711.V56129-100000@megazone23.bigpanda.com
Ответ на
Список
Дерево обсуждения
LIKE operator and indexes "Marc Mitchell" <marcm@eisolution.com>
Re: LIKE operator and indexes Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: LIKE operator and indexes "Nick Fankhauser" <nickf@ontko.com>
On Fri, 31 May 2002, Marc Mitchell wrote:

> Can anyone provide definitive information and/or points of reference within
> the documentation about the ability of the query optimizer to use indexes
> when processing a "LIKE" operator on a String column?
>
> My assumption is that
>
> "SELECT * FROM customer WHERE name LIKE 'GENERAL%';"
>
> should benefit from the existence of a BTREE index on the "customer.name"
> column.  I know this is the case is most other RDBMS's I've used including
> Postgres's ancestor Ingres.

If you are in "C" locale, and have an anchored like or regex, indexes
should be considered.  If you're in a different locale, the optimization
is turned off.

В списке pgsql-admin по дате отправления
От: Nick Fankhauser
Дата:
Сообщение: Re: LIKE operator and indexes
От: Raymond Chui
Дата:
FAQ