Using index for "like 'ABC%'" type query

From: lec <englim(at)pc(dot)jaring(dot)my>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Using index for "like 'ABC%'" type query
Date: 2003-04-18 02:56:52
Message-ID: 3E9F6974.1020405@pc.jaring.my
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

For current version of postgresql, is it possible for a query like below
to utilize an index?

select item_name from item where item_code like 'ABC%';

Earlier versions of postgresql, eg, 6.5.3 can utilize the index.

Thanks,
Thomas.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeffrey Melloy 2003-04-18 03:16:18 Re: Using index for "like 'ABC%'" type query
Previous Message Jeffrey Melloy 2003-04-18 00:29:05 7.3 PDF documentation

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeffrey Melloy 2003-04-18 03:16:18 Re: Using index for "like 'ABC%'" type query
Previous Message Thomas O'Dowd 2003-04-18 02:46:12 Re: pg 7.3.2 assert statement fails. process terminated