Can this technique work with case insensitive ILIKE?
It didn't seem to use the index when I used ILIKE instead of LIKE.
Brendan Duddridge | CTO | 403-277-5591 x24 | brendan(at)clickspace(dot)com
ClickSpace Interactive Inc.
Suite L100, 239 - 10th Ave. SE
Calgary, AB T2G 0V9
On Feb 21, 2006, at 1:28 PM, Ibrahim Tekin wrote:
> this trick did the job.
> On 2/21/06, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> Scott Marlowe wrote:
> > On Tue, 2006-02-21 at 09:57, Ibrahim Tekin wrote:
> > > hi,
> > > i have btree index on a text type field. i want see rows which
> > > with certain characters on that field. so i write a query like
> > >
> > > SELECT * FROM mytable WHERE myfield LIKE 'john%'
> > >
> > > since this condition is from start of the field, query planner
> > > use index to find such elements but explain command shows me it
> > > do a sequential scan.
> > >
> > > is this lack of a feature or i am wrong somewhere?
> > This is an artifact of how PostgreSQL handles locales other than
> > If you want such a query to use an index, you need to back up your
> > database, and re-initdb with --locale=C as an argument.
> ... or you can choose to create an index with the text_pattern_ops
> operator class, which would be used in a LIKE constraint regardless of
> Alvaro Herrera http://
> The PostgreSQL Company - Command Prompt, Inc.
In response to
pgsql-performance by date
|Next:||From: Vivek Khera||Date: 2006-02-22 16:32:33|
|Subject: Re: |
|Previous:||From: Tom Lane||Date: 2006-02-22 15:04:05|
|Subject: Re: Help with nested loop left join performance |