LIKE query on indexes

Поиск
Список
Период
Сортировка
От Ibrahim Tekin
Тема LIKE query on indexes
Дата
Msg-id e4dcba670602210757n2caf7c15t2a93353c9081c51f@mail.gmail.com
обсуждение исходный текст
Ответы Re: LIKE query on indexes  (Scott Marlowe <smarlowe@g2switchworks.com>)
Re: LIKE query on indexes  (mark@mark.mielke.cc)
Список pgsql-performance
hi,
i have btree index on a text type field. i want see rows which starts with certain characters on that field. so i write a query like this:

SELECT * FROM mytable WHERE myfield LIKE 'john%'

since this condition is from start of the field, query planner should use index to find such elements but explain command shows me it will do a sequential scan.

is this lack of a feature or i am wrong somewhere?

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

Предыдущее
От: "Virag Saksena"
Дата:
Сообщение: Re: Cost Issue - How do I force a Hash Join
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: LIKE query on indexes