Re: Postgres 9.0 has a bias against indexes - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Postgres 9.0 has a bias against indexes
Date
Msg-id 4D4192A10200002500039EEA@gw.wicourts.gov
Whole thread Raw
In response to Re: Postgres 9.0 has a bias against indexes  (Mladen Gogala <mladen.gogala@vmsinfo.com>)
List 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 by date:

Previous
From: Mladen Gogala
Date:
Subject: Re: Postgres 9.0 has a bias against indexes
Next
From: Robert Schnabel
Date:
Subject: How to best use 32 15k.7 300GB drives?