summaryrefslogtreecommitdiff
path: root/src/backend/optimizer
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2006-07-26 11:35:56 +0000
committerPeter Eisentraut <peter_e@gmx.net>2006-07-26 11:35:56 +0000
commit79bc99a46703dc07636f4c9f09067f87b324c6b4 (patch)
treef59e44dc91563cd4be2efbb8a5cde3b7f3c64360 /src/backend/optimizer
parent0c57c832b950192405004021c618315bbe786ddf (diff)
Convert effective_cache_size to an integer, for better integration with
upcoming units feature.
Diffstat (limited to 'src/backend/optimizer')
-rw-r--r--src/backend/optimizer/path/costsize.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 14350a90f7a..5f5e9ec3721 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -54,7 +54,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.163 2006/07/22 15:41:55 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.164 2006/07/26 11:35:56 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -92,7 +92,7 @@ double cpu_tuple_cost = DEFAULT_CPU_TUPLE_COST;
double cpu_index_tuple_cost = DEFAULT_CPU_INDEX_TUPLE_COST;
double cpu_operator_cost = DEFAULT_CPU_OPERATOR_COST;
-double effective_cache_size = DEFAULT_EFFECTIVE_CACHE_SIZE;
+int effective_cache_size = DEFAULT_EFFECTIVE_CACHE_SIZE;
Cost disable_cost = 100000000.0;
@@ -393,7 +393,7 @@ index_pages_fetched(double tuples_fetched, BlockNumber pages,
T = (pages > 1) ? (double) pages : 1.0;
/* b is pro-rated share of effective_cache_size */
- b = effective_cache_size * T / (T + (double) other_pages);
+ b = (double) effective_cache_size * T / (T + (double) other_pages);
/* force it positive and integral */
if (b <= 1.0)
b = 1.0;