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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Jeffrey Melloy <jmelloy(at)visualdistortion(dot)org>
Cc: lec <englim(at)pc(dot)jaring(dot)my>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Using index for "like 'ABC%'" type query
Date: 2003-04-18 03:18:48
Message-ID: 200304180318.h3I3Im813344@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


See the FAQ about index usage.

---------------------------------------------------------------------------

Jeffrey Melloy wrote:
> There is a module called "tsearch" in the contrib directory which works
> quite well.
> On Thursday, April 17, 2003, at 09:56 PM, lec wrote:
>
> > 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.
> >
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> > message can get through to the mailing list cleanly
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Christian Imbeault 2003-04-18 03:57:47 General vs Novice
Previous Message Jeffrey Melloy 2003-04-18 03:16:18 Re: Using index for "like 'ABC%'" type query

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Brown 2003-04-18 04:56:52 Re: For the ametures. (related to "Are we losing momentum?")
Previous Message Jeffrey Melloy 2003-04-18 03:16:18 Re: Using index for "like 'ABC%'" type query