LIKE query on indexes - Mailing list pgsql-performance

From Ibrahim Tekin
Subject LIKE query on indexes
Date
Msg-id e4dcba670602210757n2caf7c15t2a93353c9081c51f@mail.gmail.com
Whole thread Raw
Responses Re: LIKE query on indexes  (Scott Marlowe <smarlowe@g2switchworks.com>)
Re: LIKE query on indexes  (mark@mark.mielke.cc)
List 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 by date:

Previous
From: "Virag Saksena"
Date:
Subject: Re: Cost Issue - How do I force a Hash Join
Next
From: Scott Marlowe
Date:
Subject: Re: LIKE query on indexes