Re: LIKE should use index when condition doesn't include

From: Palle Girgensohn <girgen(at)pingpong(dot)net>
To: josh(at)agliodbs(dot)com, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: LIKE should use index when condition doesn't include
Date: 2004-03-31 01:04:40
Message-ID: 173500000.1080695080@palle.girgensohn.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

--On tisdag, mars 30, 2004 16.56.09 -0800 Josh Berkus <josh(at)agliodbs(dot)com>
wrote:

> Palle,
>
>> But what about ILIKE. It does not take advantage of indices built with
>> lower():
>
> Nope. If you want to use a functional index, you'll need to use the
> function when you call the query. ILIKE is not somehow aware that it
> is equivalent to lower().

Too bad... that was my idea, that it would somehow be aware that it is
equivalent to lower() like. It really is, isn't it? I would have though
they where synonymous. If not, makes ILIKE kind of unusable, at least
unless you're pretty certain the field will never indexed.

/Palle

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2004-03-31 01:06:54 Re: LIKE should use index when condition doesn't include
Previous Message Josh Berkus 2004-03-31 00:56:09 Re: LIKE should use index when condition doesn't include