X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id C0EB511F60E9 for ; Tue, 18 Apr 2006 12:37:59 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 required=5 tests=[BAYES_00=-2.599] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id eN03KpLvsnS8 for ; Tue, 18 Apr 2006 12:37:51 -0300 (ADT) X-Greylist: delayed 00:20:20.547717 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 3DDF511F608B for ; Tue, 18 Apr 2006 12:37:49 -0300 (ADT) Received: from tigre.interieur.gouv.fr (tigre.interieur.gouv.fr [212.234.218.76]) by svr4.postgresql.org (Postfix) with ESMTP id 49AA95AF8D3 for ; Tue, 18 Apr 2006 15:17:27 +0000 (GMT) Received: from puma20.interieur.gouv.fr (puma [10.253.20.7]) by tigre.interieur.gouv.fr (8.13.6/8.13.6) with ESMTP id k3IFHK3b030673 for ; Tue, 18 Apr 2006 17:17:20 +0200 Message-Id: <444502FA.3000609@interieur.gouv.fr> Date: Tue, 18 Apr 2006 17:17:14 +0200 From: REISS Thomas DSIC DESP User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Dave Dutcher Cc: "'Tarabas (Manuel Rorarius)'" , pgsql-performance@postgresql.org Subject: Re: Problem with LIKE-Performance References: <001a01c662f9$f2449f00$8300a8c0@tridecap.com> In-Reply-To: <001a01c662f9$f2449f00$8300a8c0@tridecap.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Archive-Number: 200604/379 X-Sequence-Number: 18463 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