1 /*-------------------------------------------------------------------------
4 * prototypes for various files in optimizer/geqo
6 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
11 *-------------------------------------------------------------------------
15 =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
16 * Martin Utesch * Institute of Automatic Control *
17 = = University of Mining and Technology =
18 * utesch@aut.tu-freiberg.de * Freiberg, Germany *
19 =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
25 #include "nodes/relation.h"
26 #include "optimizer/geqo_gene.h"
34 /* recombination mechanism */
47 * Configuration options
49 * If you change these, update backend/utils/misc/postgresql.sample.conf
51 extern int Geqo_effort
; /* 1 .. 10, knob for adjustment of defaults */
53 #define DEFAULT_GEQO_EFFORT 5
54 #define MIN_GEQO_EFFORT 1
55 #define MAX_GEQO_EFFORT 10
57 extern int Geqo_pool_size
; /* 2 .. inf, or 0 to use default */
59 extern int Geqo_generations
; /* 1 .. inf, or 0 to use default */
61 extern double Geqo_selection_bias
;
63 #define DEFAULT_GEQO_SELECTION_BIAS 2.0
64 #define MIN_GEQO_SELECTION_BIAS 1.5
65 #define MAX_GEQO_SELECTION_BIAS 2.0
69 * Data structure to encapsulate information needed for building plan trees
70 * (i.e., geqo_eval and gimme_tree).
74 PlannerInfo
*root
; /* the query we are planning */
75 List
*initial_rels
; /* the base relations */
79 /* routines in geqo_main.c */
80 extern RelOptInfo
*geqo(PlannerInfo
*root
,
81 int number_of_rels
, List
*initial_rels
);
83 /* routines in geqo_eval.c */
84 extern Cost
geqo_eval(Gene
*tour
, int num_gene
, GeqoEvalData
*evaldata
);
85 extern RelOptInfo
*gimme_tree(Gene
*tour
, int num_gene
,
86 GeqoEvalData
*evaldata
);