aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/selfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-06-05 02:49:58 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-06-05 02:49:58 +0000
commiteed6c9ed7e243948e440ed1388591b7fa28f5827 (patch)
treeaef8821bdd57ed83e2c1b2ce27014e45beed0934 /src/backend/utils/adt/selfuncs.c
parenta837851dc060515c1f7023f74d75156a80c2c936 (diff)
downloadpostgresql-eed6c9ed7e243948e440ed1388591b7fa28f5827.tar.gz
postgresql-eed6c9ed7e243948e440ed1388591b7fa28f5827.zip
Add a GUC parameter seq_page_cost, and use that everywhere we formerly
assumed that a sequential page fetch has cost 1.0. This patch doesn't in itself change the system's behavior at all, but it opens the door to people adopting other units of measurement for EXPLAIN costs. Also, if we ever decide it's worth inventing per-tablespace access cost settings, this change provides a workable intellectual framework for that.
Diffstat (limited to 'src/backend/utils/adt/selfuncs.c')
-rw-r--r--src/backend/utils/adt/selfuncs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index 5aeadce0917..c75ceef3732 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.205 2006/05/02 11:28:55 teodor Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.206 2006/06/05 02:49:58 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -4555,9 +4555,9 @@ genericcostestimate(PlannerInfo *root,
* Compute the index access cost.
*
* Disk cost: our generic assumption is that the index pages will be read
- * sequentially, so they have cost 1.0 each, not random_page_cost.
+ * sequentially, so they cost seq_page_cost each, not random_page_cost.
*/
- *indexTotalCost = numIndexPages;
+ *indexTotalCost = seq_page_cost * numIndexPages;
/*
* CPU cost: any complex expressions in the indexquals will need to be