pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Lelarge <guillaume@lelarge.info>
To: Edward W. Rouse <erouse@comsquared.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: ignore case in where clause
Date: Thu, 22 Mar 2012 21:38:42 +0100
Message-ID: <1332448722.2339.10.camel@localhost.localdomain> (raw)
In-Reply-To: <06fe01cd086a$04681ce0$0d3856a0$@com>
References: <06fe01cd086a$04681ce0$0d3856a0$@com>

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




view thread (3+ messages)  latest in thread

Message-ID: <1332448722.2339.10.camel@localhost.localdomain>
Permalink:  ../1332448722.2339.10.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1332448722.2339.10.camel@localhost.localdomain

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: guillaume@lelarge.info, erouse@comsquared.com
  Subject: Re: ignore case in where clause
  In-Reply-To: <1332448722.2339.10.camel@localhost.localdomain>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox