| 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 21:17:12 |
| Message-ID: | 9AE74FEE-0C13-11D9-8061-000D93AE0944@sitening.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
So the answer is that ILIKE will not use indexes.
But using lower()/LIKE will give you exactly the same results. lower()
forces all column data to lower case for the purposes of comparison.
-tfo
On Sep 21, 2004, at 4:07 PM, Kevin Murphy wrote:
> On Sep 21, 2004, at 4:52 PM, Thomas F.O'Connell wrote:
>> You can use an index on an expression like "lower( col ) LIKE ... "
>> as long as the LIKE expression is left-anchored. See
>
> Yes, I know that already. I wasn't talking about LIKE; I was talking
> about ILIKE. The data in the column is mixed-case.
>
> -Kevin
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ed L. | 2004-09-21 22:01:58 | Unable to drop DB in latest CVS version |
| Previous Message | Kevin Murphy | 2004-09-21 21:07:03 | Re: the current scoop on ilike and indexes |