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

From Tom Lane
Subject Re: Postgres 9.0 has a bias against indexes
Date
Msg-id 17268.1296146447@sss.pgh.pa.us
Whole thread Raw
In response to Re: Postgres 9.0 has a bias against indexes  (David Wilson <david.t.wilson@gmail.com>)
Responses Re: Postgres 9.0 has a bias against indexes
List pgsql-performance
David Wilson <david.t.wilson@gmail.com> writes:
> You're still using a 14 row table, though.

Exactly.  Please note what it says in the fine manual:

    It is worth noting that EXPLAIN results should not be extrapolated
    to situations other than the one you are actually testing; for
    example, results on a toy-sized table cannot be assumed to apply to
    large tables. The planner's cost estimates are not linear and so it
    might choose a different plan for a larger or smaller table. An
    extreme example is that on a table that only occupies one disk page,
    you'll nearly always get a sequential scan plan whether indexes are
    available or not. The planner realizes that it's going to take one
    disk page read to process the table in any case, so there's no value
    in expending additional page reads to look at an index.


            regards, tom lane

pgsql-performance by date:

Previous
From: "Igor Neyman"
Date:
Subject: Re: Real vs Int performance
Next
From: Jeff Janes
Date:
Subject: Re: Running PostgreSQL as fast as possible no matter the consequences