X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 626E7D1B8B6 for ; Fri, 19 Dec 2003 01:41:20 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 14803-03 for ; Thu, 18 Dec 2003 21:40:33 -0400 (AST) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by svr1.postgresql.org (Postfix) with ESMTP id 24876D1B439 for ; Thu, 18 Dec 2003 21:40:29 -0400 (AST) Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AX9cl-0005Rv-00 for ; Fri, 19 Dec 2003 02:40:15 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AX9an-0005QT-00 for ; Fri, 19 Dec 2003 02:38:13 +0100 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AX9an-0001T2-00 for ; Fri, 19 Dec 2003 02:38:13 +0100 From: Doug McNaught Subject: Re: is it possible to get the optimizer to use indexes Date: Thu, 18 Dec 2003 20:38:13 -0500 Lines: 12 Message-ID: <87d6alsi2i.fsf@asmodeus.mcnaught.org> References: <3FE1F5A1.6080908@geizhals.at> <60n09q9bqg.fsf@dev6.int.libertyrms.info> <1071789528.1629.10.camel@localhost.localdomain> <3FE256AA.8000707@familyhealth.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/20.7 (gnu/linux) Cancel-Lock: sha1:3UKEZsz1UOTkQlhldXduaTM4I+o= X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/286 X-Sequence-Number: 5146 Christopher Kings-Lynne writes: >> It appears that the optimizer only uses indexes for = clause? > > The optimizer will used indexes for LIKE clauses, so long as the > clause is a prefix search, eg: > > SELECT * FROM test WHERE a LIKE 'prf%'; Doesn't this still depend on your locale? -Doug