Re: the current scoop on ilike and indexes

From: Thomas F(dot)O'Connell <tfo(at)sitening(dot)com>
To: Kevin Murphy <murphy(at)genome(dot)chop(dot)edu>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: the current scoop on ilike and indexes
Date: 2004-09-21 20:52:26
Message-ID: 24F7866C-0C10-11D9-8061-000D93AE0944@sitening.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You can use an index on an expression like "lower( col ) LIKE ... " as
long as the LIKE expression is left-anchored. See

http://www.postgresql.org/docs/7.4/static/indexes-expressional.html

-tfo

On Sep 21, 2004, at 1:16 PM, Kevin Murphy wrote:

> I am pretty sure the answer is no, but ... is there any way to get
> 'ilike' to use an index? It seems like something that a lot of people
> would want to do. Otherwise, should I just create redundant
> case-mapped columns and use 'like'?
>
> Thanks,
> Kevin Murphy

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Atkins 2004-09-21 21:04:26 Re: Prioritizing queries
Previous Message Christopher Petrilli 2004-09-21 20:24:21 Prioritizing queries