Re: Postgres 9.0 has a bias against indexes

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Postgres 9.0 has a bias against indexes
Дата
Msg-id 4D4192A10200002500039EEA@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: Postgres 9.0 has a bias against indexes  (Mladen Gogala <mladen.gogala@vmsinfo.com>)
Список pgsql-performance
Mladen Gogala <mladen.gogala@vmsinfo.com> wrote:

> Yes,  Oracle can be forced into doing a sequential scan and it is
> actually faster than an index scan:

And PostgreSQL can be coerced to use an indexed scan.  Its plans are
cost-based, with user configurable cost factors; so if you tell it
that seq_page_cost and random_page_cost are both equal to some
really low value (like 0.001), you'll get an index scan.  Part of
the process of tuning PostgreSQL is to discover the relative
*actual* costs on *your environment* (which is largely dependent on
the degree of caching of the active portion of your database).  When
you get your costing factors to approximate reality, the optimizer
will do a pretty good job of picking the fastest plan.

-Kevin

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

Предыдущее
От: Mladen Gogala
Дата:
Сообщение: Re: Postgres 9.0 has a bias against indexes
Следующее
От: Robert Schnabel
Дата:
Сообщение: How to best use 32 15k.7 300GB drives?