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 D2246D1B466 for ; Wed, 24 Dec 2003 13:59:30 +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 51717-02 for ; Wed, 24 Dec 2003 09:58:45 -0400 (AST) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 4D199D1B446 for ; Wed, 24 Dec 2003 09:58:41 -0400 (AST) Received: (qmail 19690 invoked from network); 24 Dec 2003 13:58:34 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 24 Dec 2003 13:58:34 -0000 Subject: Re: is it possible to get the optimizer to use indexes From: Dave Cramer Reply-To: pg@fastcrypt.com To: Doug McNaught Cc: pgsql-performance@postgresql.org In-Reply-To: <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> <87d6alsi2i.fsf@asmodeus.mcnaught.org> Content-Type: text/plain Organization: Cramer Consulting Message-Id: <1072274314.1687.12.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 24 Dec 2003 08:58:34 -0500 Content-Transfer-Encoding: 7bit X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/292 X-Sequence-Number: 5152 Doug, Yes, it does depend on the locale, you can get around this in 7.4 by building the index with smart operators Dave On Thu, 2003-12-18 at 20:38, Doug McNaught wrote: > 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 > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > >