Re: Postgres 9.0 has a bias against indexes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mladen Gogala <mladen.gogala@xxxxxxxxxxx> 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

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux