File tree Expand file tree Collapse file tree 13 files changed +156
-57
lines changed
Expand file tree Collapse file tree 13 files changed +156
-57
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * aqo.c
3+ * Adaptive query optimization extension
4+ *
5+ * Copyright (c) 2016-2020, Postgres Professional
6+ *
7+ * IDENTIFICATION
8+ * aqo/aqo.c
9+ */
10+
111#include "aqo.h"
212
313PG_MODULE_MAGIC ;
Original file line number Diff line number Diff line change 108108 * Copyright (c) 2016-2020, Postgres Professional
109109 *
110110 * IDENTIFICATION
111- * contrib/aqo/aqo.h
111+ * aqo/aqo.h
112+ *
112113 */
113114#ifndef __ML_CARD_H__
114115#define __ML_CARD_H__
Original file line number Diff line number Diff line change 1- #include "aqo.h"
2-
3- /*****************************************************************************
1+ /*
2+ *******************************************************************************
43 *
54 * AUTOMATIC QUERY TUNING
65 *
76 * This module automatically implements basic strategies of tuning AQO for best
87 * PostgreSQL performance.
98 *
10- *****************************************************************************/
9+ *******************************************************************************
10+ *
11+ * Copyright (c) 2016-2020, Postgres Professional
12+ *
13+ * IDENTIFICATION
14+ * aqo/auto_tuning.c
15+ *
16+ */
17+
18+ #include "aqo.h"
1119
1220/*
1321 * Auto tuning criteria criteria of an query convergence by overall cardinality
Original file line number Diff line number Diff line change 1- #include "aqo.h"
2- #include "optimizer/optimizer.h"
3-
4- /*****************************************************************************
1+ /*
2+ *******************************************************************************
53 *
64 * CARDINALITY ESTIMATION
75 *
86 * This is the module in which cardinality estimation problem obtained from
97 * cardinality_hooks turns into machine learning problem.
108 *
11- *****************************************************************************/
9+ *******************************************************************************
10+ *
11+ * Copyright (c) 2016-2020, Postgres Professional
12+ *
13+ * IDENTIFICATION
14+ * aqo/cardinality_estimation.c
15+ *
16+ */
17+
18+ #include "aqo.h"
19+ #include "optimizer/optimizer.h"
1220
1321/*
1422 * General method for prediction the cardinality of given relation.
Original file line number Diff line number Diff line change 1- #include "aqo.h"
2-
3- /*****************************************************************************
1+ /*
2+ *******************************************************************************
43 *
54 * CARDINALITY ESTIMATION HOOKS
65 *
1716 * refusal to predict cardinality. In this case hooks also use default
1817 * postgreSQL cardinality estimator.
1918 *
20- *****************************************************************************/
19+ *******************************************************************************
20+ *
21+ * Copyright (c) 2016-2020, Postgres Professional
22+ *
23+ * IDENTIFICATION
24+ * aqo/cardinality_hooks.c
25+ *
26+ */
27+
28+ #include "aqo.h"
2129
2230double predicted_ppi_rows ;
2331double fss_ppi_hash ;
Original file line number Diff line number Diff line change 1- #include "aqo.h"
2-
3- /*****************************************************************************
1+ /*
2+ *******************************************************************************
43 *
54 * HASH FUNCTIONS
65 *
1110 * only in the values of their constants. We want query_hash, clause_hash and
1211 * fss_hash to satisfy this property.
1312 *
14- *****************************************************************************/
13+ *******************************************************************************
14+ *
15+ * Copyright (c) 2016-2020, Postgres Professional
16+ *
17+ * IDENTIFICATION
18+ * aqo/hash.c
19+ *
20+ */
21+
22+ #include "aqo.h"
1523
1624static int get_str_hash (const char * str );
1725static int get_node_hash (Node * node );
Original file line number Diff line number Diff line change 1- #include "aqo.h"
2-
3- /*****************************************************************************
1+ /*
2+ *******************************************************************************
43 *
54 * MACHINE LEARNING TECHNIQUES
65 *
1110 * setting after learning procedure. This property also allows to adapt to
1211 * workloads which properties are slowly changed.
1312 *
14- *****************************************************************************/
13+ *******************************************************************************
14+ *
15+ * Copyright (c) 2016-2020, Postgres Professional
16+ *
17+ * IDENTIFICATION
18+ * aqo/machine_learning.c
19+ *
20+ */
21+
22+ #include "aqo.h"
1523
1624static double fs_distance (double * a , double * b , int len );
1725static double fs_similarity (double dist );
Original file line number Diff line number Diff line change 1- #include "aqo.h"
2- #include "optimizer/optimizer.h"
3-
4- /*****************************************************************************
1+ /*
2+ *******************************************************************************
53 *
64 * EXTRACTING PATH INFORMATION UTILITIES
75 *
8- *****************************************************************************/
6+ *******************************************************************************
7+ *
8+ * Copyright (c) 2016-2020, Postgres Professional
9+ *
10+ * IDENTIFICATION
11+ * aqo/path_utils.c
12+ *
13+ */
14+
15+ #include "aqo.h"
16+ #include "optimizer/optimizer.h"
917
1018/*
1119 * Returns list of marginal selectivities using as an arguments for each clause
Original file line number Diff line number Diff line change 1- #include "aqo.h"
2- #include "access/parallel.h"
3- #include "optimizer/optimizer.h"
4- #include "utils/queryenvironment.h"
5-
6- /*****************************************************************************
1+ /*
2+ *******************************************************************************
73 *
84 * QUERY EXECUTION STATISTICS COLLECTING UTILITIES
95 *
106 * The module which updates data in the feature space linked with executed query
117 * type using obtained query execution statistics.
128 * Works only if aqo_learn is on.
139 *
14- *****************************************************************************/
10+ *******************************************************************************
11+ *
12+ * Copyright (c) 2016-2020, Postgres Professional
13+ *
14+ * IDENTIFICATION
15+ * aqo/postprocessing.c
16+ *
17+ */
18+
19+ #include "aqo.h"
20+ #include "access/parallel.h"
21+ #include "optimizer/optimizer.h"
22+ #include "utils/queryenvironment.h"
1523
1624typedef struct
1725{
Original file line number Diff line number Diff line change 1- #include "aqo.h"
2- #include "access/parallel.h"
3- #include "access/table.h"
4- #include "commands/extension.h"
5-
6- /*****************************************************************************
1+ /*
2+ *******************************************************************************
73 *
84 * QUERY PREPROCESSING HOOKS
95 *
5147 * 4. For given fspace_hash we may use its machine learning settings, but now
5248 * the machine learning setting are fixed for all feature spaces.
5349 *
54- *****************************************************************************/
50+ *******************************************************************************
51+ *
52+ * Copyright (c) 2016-2020, Postgres Professional
53+ *
54+ * IDENTIFICATION
55+ * aqo/preprocessing.c
56+ *
57+ */
58+
59+ #include "aqo.h"
60+ #include "access/parallel.h"
61+ #include "access/table.h"
62+ #include "commands/extension.h"
5563
5664static bool isQueryUsingSystemRelation (Query * query );
5765static bool isQueryUsingSystemRelation_walker (Node * node , void * context );
You can’t perform that action at this time.
0 commit comments