aboutsummaryrefslogtreecommitdiff
path: root/src/include/optimizer
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/optimizer')
-rw-r--r--src/include/optimizer/cost.h30
-rw-r--r--src/include/optimizer/internal.h13
-rw-r--r--src/include/optimizer/paths.h9
-rw-r--r--src/include/optimizer/plancat.h6
4 files changed, 29 insertions, 29 deletions
diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h
index c654b6953e7..9c16fc8fea6 100644
--- a/src/include/optimizer/cost.h
+++ b/src/include/optimizer/cost.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: cost.h,v 1.25 2000/01/09 00:26:46 tgl Exp $
+ * $Id: cost.h,v 1.26 2000/01/22 23:50:26 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,23 +20,31 @@
#define PERBYTE_CPU 0
#define PERCALL_CPU 0
#define OUTIN_RATIO 100
+/* defaults for costsize.c's Cost parameters */
+/* NB: cost-estimation code should use the variables, not the constants! */
+#define CPU_PAGE_WEIGHT 0.033
+#define CPU_INDEX_PAGE_WEIGHT 0.017
+
/*
* prototypes for costsize.c
* routines to compute costs and sizes
*/
-extern bool _enable_seqscan_;
-extern bool _enable_indexscan_;
-extern bool _enable_sort_;
-extern bool _enable_nestloop_;
-extern bool _enable_mergejoin_;
-extern bool _enable_hashjoin_;
-extern bool _enable_tidscan_;
+
+extern Cost cpu_page_weight;
+extern Cost cpu_index_page_weight;
+extern Cost disable_cost;
+extern bool enable_seqscan;
+extern bool enable_indexscan;
+extern bool enable_tidscan;
+extern bool enable_sort;
+extern bool enable_nestloop;
+extern bool enable_mergejoin;
+extern bool enable_hashjoin;
extern Cost cost_seqscan(RelOptInfo *baserel);
-extern Cost cost_index(RelOptInfo *baserel, IndexOptInfo *index,
- long expected_indexpages, Selectivity selec,
- bool is_injoin);
+extern Cost cost_index(Query *root, RelOptInfo *baserel, IndexOptInfo *index,
+ List *indexQuals, bool is_injoin);
extern Cost cost_tidscan(RelOptInfo *baserel, List *tideval);
extern Cost cost_sort(List *pathkeys, double tuples, int width);
extern Cost cost_nestloop(Path *outer_path, Path *inner_path,
diff --git a/src/include/optimizer/internal.h b/src/include/optimizer/internal.h
index 14051ca81ae..e89b244a397 100644
--- a/src/include/optimizer/internal.h
+++ b/src/include/optimizer/internal.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: internal.h,v 1.24 2000/01/11 03:59:31 tgl Exp $
+ * $Id: internal.h,v 1.25 2000/01/22 23:50:27 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,14 +26,6 @@
/*
- * System-dependent tuning constants
- *
- */
-#define _CPU_PAGE_WEIGHT_ 0.033 /* CPU-heap-to-page cost weighting factor */
-#define _CPU_INDEX_PAGE_WEIGHT_ 0.017 /* CPU-index-to-page cost
- * weighting factor */
-
-/*
* Size estimates
*
*/
@@ -60,7 +52,4 @@
/* used to be -1 */
#define _NONAME_RELATION_ID_ InvalidOid
-/* GEQO switch according to number of relations in a query */
-#define GEQO_RELS 11
-
#endif /* INTERNAL_H */
diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h
index a3f6bad36be..1556941c4b9 100644
--- a/src/include/optimizer/paths.h
+++ b/src/include/optimizer/paths.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: paths.h,v 1.37 2000/01/09 00:26:47 tgl Exp $
+ * $Id: paths.h,v 1.38 2000/01/22 23:50:27 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,9 +16,16 @@
#include "nodes/relation.h"
+/* default GEQO threshold (default value for geqo_rels) */
+#define GEQO_RELS 11
+
+
/*
* allpaths.c
*/
+extern bool enable_geqo;
+extern int geqo_rels;
+
extern RelOptInfo *make_one_rel(Query *root, List *rels);
/*
diff --git a/src/include/optimizer/plancat.h b/src/include/optimizer/plancat.h
index 307b51c3f42..024cfd6999e 100644
--- a/src/include/optimizer/plancat.h
+++ b/src/include/optimizer/plancat.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: plancat.h,v 1.15 2000/01/09 00:26:47 tgl Exp $
+ * $Id: plancat.h,v 1.16 2000/01/22 23:50:27 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -30,10 +30,6 @@ extern Selectivity restriction_selectivity(Oid functionObjectId,
Datum constValue,
int constFlag);
-extern void index_selectivity(Query *root, RelOptInfo *rel,
- IndexOptInfo *index, List *indexquals,
- long *idxPages, Selectivity *idxSelec);
-
extern Selectivity join_selectivity(Oid functionObjectId, Oid operatorObjectId,
Oid relationObjectId1, AttrNumber attributeNumber1,
Oid relationObjectId2, AttrNumber attributeNumber2);