Using index for substring search

From: Lec <englim(at)pc(dot)jaring(dot)my>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Using index for substring search
Date: 2002-03-12 23:12:15
Message-ID: 3C8E8B4F.5900AF42@pc.jaring.my
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is it possible for postgreSQL 7.2 to use index search for the following
queries:

select name from item where substring(itemcode,1,3) = '101';
select name from item where itemcode like '101%';

if I have an index on itemcode.

Version 6.5.3 can use index search for the first query.

Thanks,
Thomas.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Trond Eivind =?iso-8859-1?q?Glomsr=F8d?= 2002-03-12 23:30:42 Re: Zlib vulnerability heads-up.
Previous Message Stephan Szabo 2002-03-12 22:33:21 Re: index on large table