Re: Basic question about indexes/explain - Mailing list pgsql-performance

From Tom Lane
Subject Re: Basic question about indexes/explain
Date
Msg-id 27301.1035642292@sss.pgh.pa.us
Whole thread Raw
In response to Re: Basic question about indexes/explain  (Mario Weilguni <mweilguni@sime.com>)
List pgsql-performance
Mario Weilguni <mweilguni@sime.com> writes:
> Everything is explained in the manual, check
> http://developer.postgresql.org/docs/postgres/indexes.html

In particular note the comments at the bottom of
http://developer.postgresql.org/docs/postgres/performance-tips.html:

"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 can't be assumed to apply to large
tables. The planner's cost estimates are not linear and so it may well
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: Mario Weilguni
Date:
Subject: Re: Basic question about indexes/explain
Next
From: Carlos Moreno
Date:
Subject: Setting shared buffers