pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim C. Nasby <jnasby@pervasive.com>
To: Marcos <mjs_ops@gmx.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Simple Question of Performance ILIKE or Lower
Date: Wed, 18 Jan 2006 17:02:30 -0600
Message-ID: <20060118230230.GZ17896@pervasive.com> (raw)
In-Reply-To: <1137575430.966.10.camel@servidor>
References: <1137575430.966.10.camel@servidor>

On Wed, Jan 18, 2006 at 09:10:30AM +0000, Marcos wrote:
> Hi,
> 
> I have a simple question about performance using two resources.
> 
> What's have the best performance?
> 
> lower( col1 ) LIKE lower( 'myquestion%' )
> 
> OR
> 
> col1 ILIKE 'myquestion%'

If you index lower( col1 ), then the former would likely perform better
(if the optimizer knows it could use the index in that case). Otherwise
I suspect they'd be the same.

Try it and find out.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



view thread (2+ messages)

Message-ID: <20060118230230.GZ17896@pervasive.com>
Permalink:  ../20060118230230.GZ17896@pervasive.com/
Also on:    postgresql.org/message-id/20060118230230.GZ17896@pervasive.com

 · 

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-performance@postgresql.org
  Cc: jnasby@pervasive.com, mjs_ops@gmx.net
  Subject: Re: Simple Question of Performance ILIKE or Lower
  In-Reply-To: <20060118230230.GZ17896@pervasive.com>

* 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