Re: ilike not using index.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kenneth Marshall <ktm(at)rice(dot)edu>
Cc: Darryl Pye <darrylpye(at)hotmail(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: ilike not using index.
Date: 2010-06-21 20:03:35
Message-ID: 17179.1277150615@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Kenneth Marshall <ktm(at)rice(dot)edu> writes:
> On Mon, Jun 21, 2010 at 03:36:07PM -0400, Tom Lane wrote:
>> You might consider creating an index on lower(full_name) and then
>> querying WHERE lower(full_name) LIKE whatever.

> Would citext support this?

No, unfortunately. The index optimization for LIKE is hard-wired into
the planner, so it only supports built-in data types. Someday it'd be
nice to have a way for add-on modules to insert that sort of
optimization.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Morris, Roy 2010-06-21 20:12:06 Migration Advise
Previous Message Kenneth Marshall 2010-06-21 19:39:52 Re: ilike not using index.