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.