Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id E800A4249 for ; Thu, 22 Mar 2012 18:08:49 -0300 (ADT) Received: from smtp.comsquared.com ([209.155.237.140]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SApCr-0001KX-CL for pgsql-sql@postgresql.org; Thu, 22 Mar 2012 21:06:05 +0000 Received: from mdpserv.comsquared.com (mdpserv [10.82.40.1]) by smtp.comsquared.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id q2ML5hoN017311 for ; Thu, 22 Mar 2012 17:05:46 -0400 (EDT) Received: from erouse052008 ([10.82.60.61]) by mdpserv.comsquared.com (8.13.6+Sun/8.13.6) with ESMTP id q2ML5gE6025949 for ; Thu, 22 Mar 2012 17:05:42 -0400 (EDT) From: "Edward W. Rouse" To: References: <06fe01cd086a$04681ce0$0d3856a0$@com> <1332448722.2339.10.camel@localhost.localdomain> In-Reply-To: <1332448722.2339.10.camel@localhost.localdomain> Subject: Re: ignore case in where clause Date: Thu, 22 Mar 2012 17:05:41 -0400 Message-ID: <06ff01cd086f$8a610aa0$9f231fe0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac0Ia9awMfUj58EDTO2vFho/U5kkKwAA6RMQ Content-Language: en-us X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/62 X-Sequence-Number: 36457 That was exactly it, Thanks. > -----Original Message----- > From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql- > owner@postgresql.org] On Behalf Of Guillaume Lelarge > Sent: Thursday, March 22, 2012 4:39 PM > To: Edward W. Rouse > Cc: pgsql-sql@postgresql.org > Subject: Re: [SQL] ignore case in where clause > > On Thu, 2012-03-22 at 16:26 -0400, Edward W. Rouse wrote: > > I am currently using lower(column) = '' for matching case > insensitive. I > > know that there are ways to do this with regular expressions too. I > recently > > noticed that including even one lower causes severe performance > issues (from > > 290ms to over 80Kms). > > > > Probably because it cannot use the index anymore. Try creating an index > on lower(column), and see if it helps. > > > -- > Guillaume > http://blog.guillaume.lelarge.info > http://www.dalibo.com > > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql