From: | "Samuel J(dot) Sutjiono" <ssutjiono(at)wc-group(dot)com> |
---|---|
To: | <holger(at)marzen(dot)de> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How does Index Scan get used |
Date: | 2002-02-22 15:30:30 |
Message-ID: | 01ca01c1bbb5$dd32e760$110a010a@headquarters.wcgroup.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
No, I didn't.
----- Original Message -----
From: "Holger Marzen" <holger(at)marzen(dot)de>
To: "Samuel J. Sutjiono" <ssutjiono(at)wc-group(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Sent: Friday, February 22, 2002 10:25 AM
Subject: Re: [GENERAL] How does Index Scan get used
> On Fri, 22 Feb 2002, Samuel J. Sutjiono wrote:
>
> > I tried an Index Scan but I kept on getting Seq Scan. Do you know why ?
What do I need to do to get my query to use index scan (I tried to turn it
on by doing SET ENABLE_indexscan = on; but it didn't work)
> >
> > create table test (test_col text);
> > create index test_index on test (test_col);
> > insert into test values ('abc.xyz');
> > insert into test values ('abcxyz');
> > insert into test values ('abc/xyz');
> >
> > explain select * from test where test_col like 'abc/%';
> >
> > NOTICE: QUERY PLAN:
> >
> > Seq Scan on test (cost=0.00..22.50 rows=10 width=12)
>
> Did you do a vacuum analyze after creating the index?
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Eckermann | 2002-02-22 15:37:13 | Re: environment variables, output format & setting current date |
Previous Message | Fran Fabrizio | 2002-02-22 15:29:32 | Does iscachable work? |