Re: Problem with LIKE-Performance - Mailing list pgsql-performance

From REISS Thomas DSIC DESP
Subject Re: Problem with LIKE-Performance
Date
Msg-id 444502FA.3000609@interieur.gouv.fr
Whole thread Raw
In response to Re: Problem with LIKE-Performance  ("Dave Dutcher" <dave@tridecap.com>)
List pgsql-performance

Dave Dutcher a écrit :
> It looks like you are getting a sequential scan instead of an index
> scan.  What is your locale setting?  As far as I know Postgres doesn't
> support using indexes with LIKE unless you are using the C locale.
>
It does if you create your index this way :

CREATE INDEX idx_image_title
  ON image
  USING btree
  (title varchar_pattern_ops);

Please see http://www.postgresql.org/docs/8.1/interactive/indexes-opclass.html


Thomas


pgsql-performance by date:

Previous
From: "Hakan Kocaman"
Date:
Subject: Re: Problem with LIKE-Performance
Next
From: Guido Neitzer
Date:
Subject: Re: Problem with LIKE-Performance