aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2012-02-14 16:54:54 -0500
committerBruce Momjian <bruce@momjian.us>2012-02-14 16:54:54 -0500
commitc1d9df4fa227781b31be44a5a3024865a7f48049 (patch)
tree89a9e9741f9f62740a4f0fb7d6ee0b8b7b392466
parentef7a7c81d99c721db6e7d550f3fef3b94737ee94 (diff)
downloadpostgresql-c1d9df4fa227781b31be44a5a3024865a7f48049.tar.gz
postgresql-c1d9df4fa227781b31be44a5a3024865a7f48049.zip
Document random page cost is only 4x seqeuntial, and not 40x.
-rw-r--r--doc/src/sgml/config.sgml20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 3a843217602..0ea9aebdb02 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -2604,6 +2604,26 @@ SET ENABLE_SEQSCAN TO OFF;
parameters.
</para>
+ <para>
+ Random access to mechanical disk storage is normally much more expensive
+ than four-times sequential access. However, a lower default is used
+ (4.0) because the majority of random accesses to disk, such as indexed
+ reads, are assumed to be in cache. The default value can be thought of
+ as modeling random access as 40 times slower than sequential, while
+ expecting 90% of random reads to be cached.
+ </para>
+
+ <para>
+ If you believe a 90% cache rate is an incorrect assumption
+ for your workload, you can increase random_page_cost to better
+ reflect the true cost of random storage reads. Correspondingly,
+ if your data is likely to be completely in cache, such as when
+ the database is smaller than the total server memory, decreasing
+ random_page_cost can be appropriate. Storage that has a low random
+ read cost relative to sequential, e.g. solid-state drives, might
+ also be better modeled with a lower value for random_page_cost.
+ </para>
+
<tip>
<para>
Although the system will let you set <varname>random_page_cost</> to