Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 211459FB4F9 for ; Wed, 7 Mar 2007 14:32:41 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 61943-04 for ; Wed, 7 Mar 2007 14:32:32 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 29AF89FB2A4 for ; Wed, 7 Mar 2007 14:32:31 -0400 (AST) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1HP1BP-0005os-KG for pgsql-sql@postgresql.org; Wed, 07 Mar 2007 13:48:15 -0500 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id D31293F9E; Wed, 7 Mar 2007 13:32:24 -0500 (EST) Date: Wed, 7 Mar 2007 13:32:24 -0500 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: best index for ~ ordering? Message-ID: <20070307183224.GC19042@phlogiston.dyndns.org> References: <45EDDE5F.2030303@fmed.uba.ar> <20070306222802.GA16606@phlogiston.dyndns.org> <22296.190.55.118.199.1173238137.squirrel@www.webmail.fmed.uba.ar> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22296.190.55.118.199.1173238137.squirrel@www.webmail.fmed.uba.ar> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/72 X-Sequence-Number: 27710 On Wed, Mar 07, 2007 at 12:28:57AM -0300, gherzig@fmed.uba.ar wrote: > Well, im wondering if is possible using LIKE '%blah%', even better would be > upper/lower(string) like '%blah%', Your better bet then is either to index lower(string) or better, on insert convert everything to lower(). A -- Andrew Sullivan | ajs@crankycanuck.ca The plural of anecdote is not data. --Roger Brinner