Re: PG8.2.1 choosing slow seqscan over idx scan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PG8.2.1 choosing slow seqscan over idx scan
Дата
Msg-id 26412.1168983547@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PG8.2.1 choosing slow seqscan over idx scan  ("Jeremy Haile" <jhaile@fastmail.fm>)
Ответы Re: PG8.2.1 choosing slow seqscan over idx scan
Список pgsql-performance
"Jeremy Haile" <jhaile@fastmail.fm> writes:
> Running PostgreSQL 8.2.1 on Win32.   The query planner is choosing a seq
> scan over index scan even though index scan is faster (as shown by
> disabling seqscan).  Table is recently analyzed and row count estimates
> seem to be in the ballpark.

Try reducing random_page_cost a bit.  Keep in mind that you are probably
measuring a fully-cached situation here, if you repeated the test case.
If your database fits into memory reasonably well then that's fine and
you want to optimize for that case ... but otherwise you may find
yourself pessimizing the actual behavior.

            regards, tom lane

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

Предыдущее
От: "Jeremy Haile"
Дата:
Сообщение: PG8.2.1 choosing slow seqscan over idx scan
Следующее
От: "Jeremy Haile"
Дата:
Сообщение: Re: PG8.2.1 choosing slow seqscan over idx scan