From d40896fc14523a9c402acc73835c1c46b1729749 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Tue, 14 Sep 2004 12:23:27 +0000 Subject: [PATCH] Added a note about tweeking random_page_cost git-svn-id: http://svn.osgeo.org/postgis/trunk@819 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/postgis.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/postgis.xml b/doc/postgis.xml index 362b43375..31147f6d2 100644 --- a/doc/postgis.xml +++ b/doc/postgis.xml @@ -1488,6 +1488,16 @@ SELECT UPDATE_GEOMETRY_STATS([table_name], [column_name]);ENABLE_SEQSCAN. + + + If you find the planner wrong about the cost of + sequencial vs index scans try reducing the value of + random_page_cost in postgresql.conf or using SET + random_page_cost=#. Default value for the parameter + is 4, try setting it to 1 or 2. Decrementing the + value makes the planner more inclined of using Index scans. + +