Re: LIke and Indicies

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Dave Smith <dave(dot)smith(at)candata(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: LIke and Indicies
Date: 2005-02-25 16:44:11
Message-ID: 200502251744.12299.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am Freitag, 25. Februar 2005 17:31 schrieb Dave Smith:
> I am using 7.4.5 and trying to use the like clause (Local C) but
> postgres does not seem to want to use the index.
>
> explain
> declare t scroll cursor for
> select * from product where company_id=1000 and product_desc like 'J%'
> order by company_id,product_desc;
>
> QUERY
> PLAN
> ---------------------------------------------------------------------------
>------ Index Scan using product_4 on product (cost=0.00..12306.67 rows=881
> width=181)
> Index Cond: (company_id = 1000)
> Filter: ((product_desc)::text ~~ 'J%'::text)

What part of "Index Scan" are you misunderstanding?

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dave Smith 2005-02-25 16:54:01 Re: LIke and Indicies
Previous Message Dave Smith 2005-02-25 16:31:57 LIke and Indicies