Re: LIKE on index not working

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Chris Cox" <cjcox(at)optushome(dot)com(dot)au>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: LIKE on index not working
Date: 2004-07-22 12:41:04
Message-ID: 200407221441.05497.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Am Donnerstag, 22. Juli 2004 09:38 schrieb Chris Cox:
> For some reason I just can't get this to use the index for the following
> query. I'm using PostgreSQL 7.3.4.

In 7.3, LIKE cannot use an index unless you set the locale to C. In 7.4, LIKE
can use an index, but it has to be a different kind of index, as explained
here:

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

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message terry 2004-07-22 13:10:32 Re: next integer in serial key
Previous Message Karsten Hilbert 2004-07-22 12:20:40 Re: surrogate key or not?