Re: Query Plan - Index Scan & Seq Scan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query Plan - Index Scan & Seq Scan
Дата
Msg-id 886.1115910870@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Query Plan - Index Scan & Seq Scan  (Prasanth <dbadmin@nqadmin.com>)
Ответы Re: Query Plan - Index Scan & Seq Scan
Список pgsql-admin
Prasanth <dbadmin@nqadmin.com> writes:
>  Hash Join  (cost=13865.30..326413.23 rows=6451 width=18)
>    Hash Cond: ("outer".id = "inner".id)
>    ->  Seq Scan on a  (cost=0.00..125076.37 rows=6450937 width=18)
>    ->  Hash  (cost=10168.64..10168.64 rows=500664 width=4)
>          ->  Seq Scan on b (cost=0.00..10168.64 rows=500664 width=4)
> (5 rows)

> The planner used to perform a index scan. I have added a lot of data in those
> two tables. Right now both tables have millions of records.

It is highly unlikely that you want an index scan for joining millions
of records ...

However, if you do have millions in both tables, why does the planner
think there are only 500664 rows in b?  Maybe you are overdue for ANALYZE.

            regards, tom lane

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Kavan, Dan (IMS)"
Дата:
Сообщение: Re: memory allocation ; postgresql-8.0
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: memory allocation ; postgresql-8.0