Fix obsolete comment regarding FSM truncation.
[PostgreSQL.git] / src / include / optimizer / geqo.h
blob2ab544963cb038989c283f606348b226424637e1
1 /*-------------------------------------------------------------------------
3 * geqo.h
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
9 * $PostgreSQL$
11 *-------------------------------------------------------------------------
14 /* contributed by:
15 =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
16 * Martin Utesch * Institute of Automatic Control *
17 = = University of Mining and Technology =
18 * utesch@aut.tu-freiberg.de * Freiberg, Germany *
19 =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
22 #ifndef GEQO_H
23 #define GEQO_H
25 #include "nodes/relation.h"
26 #include "optimizer/geqo_gene.h"
29 /* GEQO debug flag */
31 #define GEQO_DEBUG
34 /* recombination mechanism */
36 #define ERX
37 #define PMX
38 #define CX
39 #define PX
40 #define OX1
41 #define OX2
43 #define ERX
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).
72 typedef struct
74 PlannerInfo *root; /* the query we are planning */
75 List *initial_rels; /* the base relations */
76 } GeqoEvalData;
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);
88 #endif /* GEQO_H */