How to make LIKE to use index in "abc%" query?

Поиск
Список
Период
Сортировка
От Dmitry Koterov
Тема How to make LIKE to use index in "abc%" query?
Дата
Msg-id d7df81620710080941l27c46c22y397061975bb15718@mail.gmail.com
обсуждение исходный текст
Ответы Re: How to make LIKE to use index in "abc%" query?  (Dimitri Fontaine <dfontaine@hi-media.com>)
Re: How to make LIKE to use index in "abc%" query?  (Oleg Bartunov <oleg@sai.msu.su>)
Список pgsql-general
Hello.

I run

explain analyze
SELECT id FROM "table" WHERE name LIKE 'dt%';

having a btree index on "name" column. But unfortunately it uses seqscan instead of index scan, it's too slow.

I had read some mailing archives about that problem, but have not found a solution. How to fix this LIKE behaviour withour re-creation af the whole database? Is it possible?

I use windows-1251 locale, not C locale.

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

Предыдущее
От: "Dave"
Дата:
Сообщение: Re: Foreign Key for PHP serialized data - possible?
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: How to make LIKE to use index in "abc%" query?