Re: help with getting index scan - Mailing list pgsql-general

From Thomas T. Thai
Subject Re: help with getting index scan
Date
Msg-id Pine.NEB.4.43.0203061209450.10216-100000@ns01.minnesota.com
Whole thread Raw
In response to Re: help with getting index scan  (Masaru Sugawara <rk73@sea.plala.or.jp>)
List pgsql-general
On Thu, 7 Mar 2002, Masaru Sugawara wrote:

> > the query below  still results in a seq scan:
> > ...
> > ->  Seq Scan on phone_cat_address pca
> >    (cost=0.00..5843.01 rows=336701 width=8)
> >    (actual time=0.97..2875.06 rows=336701 loops=1)
> >       ->  Hash  (cost=43.58..43.58 rows=11 width=4)
> >           (actual time=3.91..3.91 rows=0 loops=1)
>
>
>  It's a pity that the query use no index on phone_cat_address.

when i force it to use index scan, time drops down to ~800 ms.

> > Total runtime: 5240.28 msec
[...]
>  Since phone_cat_address isn't limited by a WHERE cluse, etc., most of its
>  rows will be selected. Therefore the planner seems to judge that a
>  sequential scan is better/faster than an index scan.


--
Thomas T. Thai
Minnesota.com, Inc.




pgsql-general by date:

Previous
From: Holger Marzen
Date:
Subject: PostgreSQL and LDAP
Next
From: "Booth, Robert"
Date:
Subject: Solaris Shared Memory