Re: Best way to use indexes for partial match at beginning

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Best way to use indexes for partial match at beginning
Дата
Msg-id 437251A3.9000707@archonet.com
обсуждение исходный текст
Ответ на Re: Best way to use indexes for partial match at beginning  ("Andrus" <eetasoft@online.ee>)
Список pgsql-general
Andrus wrote:
> So
>
> CREATE INDEX i1 ON foo(col1);
>
> cannot be used to optimize queries of type "get all rows where first n
> charaters of col1 are known" in Postgres.

Of course it will! Any btree based index will let you do that. Re-read
the previous answers and make sure you pay attention to the bit about
text_pattern_ops and LIKE in non-C locales.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: "Markus Wollny"
Дата:
Сообщение: invalid UTF-8 byte sequence detected
Следующее
От: Jaime Casanova
Дата:
Сообщение: Re: Best way to use indexes for partial match at beginning