Re: Using index for substring search

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Using index for substring search
Дата
Msg-id 200203130010.g2D0AgY23142@candle.pha.pa.us
обсуждение исходный текст
Ответ на Using index for substring search  (Lec <englim@pc.jaring.my>)
Список pgsql-general
Lec wrote:
> Is it possible for postgreSQL 7.2 to use index search for the following
> queries:
>
> select name from item where substring(itemcode,1,3) = '101';
> select name from item where itemcode like '101%';
>
> if I have an index on itemcode.
>
> Version 6.5.3 can use index search for the first query.

Are you sure?  7.2 and I thought earlier releases could only use an
index on the second query.  There is even an FAQ item.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

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

Предыдущее
От: hubert.palme@web.de (Hubert Palme)
Дата:
Сообщение: Re: PL/pgSQL Syntax Problem
Следующее
От: David Fetter
Дата:
Сообщение: Storing Credit Card Info?