Re: ignore case in where clause

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: "Edward W(dot) Rouse" <erouse(at)comsquared(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: ignore case in where clause
Date: 2012-03-22 20:38:42
Message-ID: 1332448722.2339.10.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Edward W. Rouse 2012-03-22 21:05:41 Re: ignore case in where clause
Previous Message Edward W. Rouse 2012-03-22 20:26:09 ignore case in where clause