summaryrefslogtreecommitdiff
path: root/src/include/optimizer
diff options
context:
space:
mode:
authorPeter Eisentraut2000-05-31 00:28:42 +0000
committerPeter Eisentraut2000-05-31 00:28:42 +0000
commit6a68f42648f54690ad5b5ae6fb9104e86e15f0f1 (patch)
tree4b6742f51fb2160dbe2ce090273fd430dc2b2499 /src/include/optimizer
parent5e4d554bae6a7177903cdb99bf5d41b695519a45 (diff)
The heralded `Grand Unified Configuration scheme' (GUC)
That means you can now set your options in either or all of $PGDATA/configuration, some postmaster option (--enable-fsync=off), or set a SET command. The list of options is in backend/utils/misc/guc.c, documentation will be written post haste. pg_options is gone, so is that pq_geqo config file. Also removed were backend -K, -Q, and -T options (no longer applicable, although -d0 does the same as -Q). Added to configure an --enable-syslog option. changed all callers from TPRINTF to elog(DEBUG)
Diffstat (limited to 'src/include/optimizer')
-rw-r--r--src/include/optimizer/cost.h10
-rw-r--r--src/include/optimizer/geqo.h33
-rw-r--r--src/include/optimizer/paths.h4
-rw-r--r--src/include/optimizer/planmain.h3
4 files changed, 24 insertions, 26 deletions
diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h
index dabfb681756..783dd96e482 100644
--- a/src/include/optimizer/cost.h
+++ b/src/include/optimizer/cost.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: cost.h,v 1.32 2000/04/12 17:16:42 momjian Exp $
+ * $Id: cost.h,v 1.33 2000/05/31 00:28:38 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -38,10 +38,10 @@
/* parameter variables and flags */
extern double effective_cache_size;
-extern Cost random_page_cost;
-extern Cost cpu_tuple_cost;
-extern Cost cpu_index_tuple_cost;
-extern Cost cpu_operator_cost;
+extern double random_page_cost;
+extern double cpu_tuple_cost;
+extern double cpu_index_tuple_cost;
+extern double cpu_operator_cost;
extern Cost disable_cost;
extern bool enable_seqscan;
extern bool enable_indexscan;
diff --git a/src/include/optimizer/geqo.h b/src/include/optimizer/geqo.h
index c7f56e8e7d7..bf65771529b 100644
--- a/src/include/optimizer/geqo.h
+++ b/src/include/optimizer/geqo.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo.h,v 1.18 2000/01/26 05:58:20 momjian Exp $
+ * $Id: geqo.h,v 1.19 2000/05/31 00:28:38 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,32 +41,29 @@
*/
#define ERX
-/* genetic algorithm parameters */
-#define GEQO_FILE "pg_geqo" /* Name of the ga config file */
+/*
+ * Configuration options
+ */
+extern int Geqo_pool_size;
+#define DEFAULT_GEQO_POOL_SIZE 0 /* = default based on no. of relations. */
+#define MIN_GEQO_POOL_SIZE 128
+#define MAX_GEQO_POOL_SIZE 1024
-#define MIN_POOL 128 /* minimum number of individuals */
-#define MAX_POOL 1024 /* maximum number of individuals */
+extern int Geqo_effort; /* 1 .. inf, only used to calculate generations default */
+extern int Geqo_generations; /* 1 .. inf, or 0 to use default based on pool size */
-#define LOW_EFFORT 1 /* optimization effort values */
-#define MEDIUM_EFFORT 40 /* are multipliers for computed */
-#define HIGH_EFFORT 80 /* number of generations */
+extern double Geqo_selection_bias;
+#define DEFAULT_GEQO_SELECTION_BIAS 2.0
+#define MIN_GEQO_SELECTION_BIAS 1.5
+#define MAX_GEQO_SELECTION_BIAS 2.0
-#define SELECTION_BIAS 2.0 /* selective pressure within population */
- /* should be 1.5 <= SELECTION_BIAS <= 2.0 */
+extern int Geqo_random_seed; /* or negative to use current time */
-/* parameter values set in geqo_params.c */
-extern int PoolSize;
-extern int Generations;
-extern long RandomSeed;
-extern double SelectionBias;
/* routines in geqo_main.c */
extern RelOptInfo *geqo(Query *root);
-/* routines in geqo_params.c */
-extern void geqo_params(int string_length);
-
/* routines in geqo_eval.c */
extern void geqo_eval_startup(void);
extern Cost geqo_eval(Query *root, Gene *tour, int num_gene);
diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h
index 0a2f56db63a..ff265234186 100644
--- a/src/include/optimizer/paths.h
+++ b/src/include/optimizer/paths.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: paths.h,v 1.44 2000/04/12 17:16:42 momjian Exp $
+ * $Id: paths.h,v 1.45 2000/05/31 00:28:38 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,7 +18,7 @@
#include "nodes/relation.h"
/* default GEQO threshold (default value for geqo_rels) */
-#define GEQO_RELS 11
+#define DEFAULT_GEQO_RELS 11
/*
diff --git a/src/include/optimizer/planmain.h b/src/include/optimizer/planmain.h
index e0a0d84bc8a..9a14d2ea590 100644
--- a/src/include/optimizer/planmain.h
+++ b/src/include/optimizer/planmain.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: planmain.h,v 1.39 2000/04/12 17:16:42 momjian Exp $
+ * $Id: planmain.h,v 1.40 2000/05/31 00:28:38 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -55,6 +55,7 @@ extern void fix_opids(Node *node);
/*
* prep/prepkeyset.c
*/
+extern bool _use_keyset_query_optimizer;
extern void transformKeySetQuery(Query *origNode);
#endif /* PLANMAIN_H */