pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: REISS Thomas DSIC DESP <thomas.reiss@interieur.gouv.fr>
To: Dave Dutcher <dave@tridecap.com>
Cc: 'Tarabas (Manuel Rorarius)' <tarabas@tarabas.de>
Cc: pgsql-performance@postgresql.org
Subject: Re: Problem with LIKE-Performance
Date: Tue, 18 Apr 2006 17:17:14 +0200
Message-ID: <444502FA.3000609@interieur.gouv.fr> (raw)
In-Reply-To: <001a01c662f9$f2449f00$8300a8c0@tridecap.com>
References: <001a01c662f9$f2449f00$8300a8c0@tridecap.com>



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




view thread (13+ messages)  latest in thread

Message-ID: <444502FA.3000609@interieur.gouv.fr>
Permalink:  ../444502FA.3000609@interieur.gouv.fr/
Also on:    postgresql.org/message-id/444502FA.3000609@interieur.gouv.fr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: thomas.reiss@interieur.gouv.fr, dave@tridecap.com, tarabas@tarabas.de
  Subject: Re: Problem with LIKE-Performance
  In-Reply-To: <444502FA.3000609@interieur.gouv.fr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox