Re: Problem with LIKE-Performance

From: REISS Thomas DSIC DESP <thomas(dot)reiss(at)interieur(dot)gouv(dot)fr>
To: Dave Dutcher <dave(at)tridecap(dot)com>
Cc: "'Tarabas (Manuel Rorarius)'" <tarabas(at)tarabas(dot)de>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Problem with LIKE-Performance
Date: 2006-04-18 15:17:14
Message-ID: 444502FA.3000609@interieur.gouv.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-04-18 15:20:20 Re: Problem with LIKE-Performance
Previous Message Tarabas (Manuel Rorarius) 2006-04-18 15:16:18 Re: Problem with LIKE-Performance