Re: help with getting index scan

Поиск
Список
Период
Сортировка
От Thomas T. Thai
Тема Re: help with getting index scan
Дата
Msg-id Pine.NEB.4.43.0203061209450.10216-100000@ns01.minnesota.com
обсуждение исходный текст
Ответ на Re: help with getting index scan  (Masaru Sugawara <rk73@sea.plala.or.jp>)
Список 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 по дате отправления:

Предыдущее
От: Holger Marzen
Дата:
Сообщение: PostgreSQL and LDAP
Следующее
От: "Booth, Robert"
Дата:
Сообщение: Solaris Shared Memory