Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 27ea115

Browse files
committed
License fix
1 parent 1ef6dcd commit 27ea115

13 files changed

+156
-57
lines changed

aqo.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
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

313
PG_MODULE_MAGIC;

aqo.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@
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__

auto_tuning.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
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

cardinality_estimation.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
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.

cardinality_hooks.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#include "aqo.h"
2-
3-
/*****************************************************************************
1+
/*
2+
*******************************************************************************
43
*
54
* CARDINALITY ESTIMATION HOOKS
65
*
@@ -17,7 +16,16 @@
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

2230
double predicted_ppi_rows;
2331
double fss_ppi_hash;

hash.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#include "aqo.h"
2-
3-
/*****************************************************************************
1+
/*
2+
*******************************************************************************
43
*
54
* HASH FUNCTIONS
65
*
@@ -11,7 +10,16 @@
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

1624
static int get_str_hash(const char *str);
1725
static int get_node_hash(Node *node);

machine_learning.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#include "aqo.h"
2-
3-
/*****************************************************************************
1+
/*
2+
*******************************************************************************
43
*
54
* MACHINE LEARNING TECHNIQUES
65
*
@@ -11,7 +10,16 @@
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

1624
static double fs_distance(double *a, double *b, int len);
1725
static double fs_similarity(double dist);

path_utils.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
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

postprocessing.c

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
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

1624
typedef struct
1725
{

preprocessing.c

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
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
*
@@ -51,7 +47,19 @@
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

5664
static bool isQueryUsingSystemRelation(Query *query);
5765
static bool isQueryUsingSystemRelation_walker(Node *node, void *context);

selectivity_cache.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1-
#include "aqo.h"
2-
3-
/*****************************************************************************
1+
/*
2+
*******************************************************************************
43
*
54
* SELECTIVITY CACHE
65
*
76
* Stores the clause selectivity with the given relids for parametrized
87
* clauses, because otherwise it cannot be restored after query execution
98
* without PlannerInfo.
109
*
11-
*****************************************************************************/
10+
*******************************************************************************
11+
*
12+
* Copyright (c) 2016-2020, Postgres Professional
13+
*
14+
* IDENTIFICATION
15+
* aqo/selectivity_cache.c
16+
*
17+
*/
18+
19+
#include "aqo.h"
1220

1321
typedef struct
1422
{

storage.c

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
#include "aqo.h"
2-
3-
#include "access/heapam.h"
4-
#include "access/table.h"
5-
#include "access/tableam.h"
6-
7-
/*****************************************************************************
1+
/*
2+
*******************************************************************************
83
*
94
* STORAGE INTERACTION
105
*
116
* This module is responsible for interaction with the storage of AQO data.
127
* It does not provide information protection from concurrent updates.
138
*
14-
*****************************************************************************/
9+
*******************************************************************************
10+
*
11+
* Copyright (c) 2016-2020, Postgres Professional
12+
*
13+
* IDENTIFICATION
14+
* aqo/storage.c
15+
*
16+
*/
17+
18+
#include "aqo.h"
19+
20+
#include "access/heapam.h"
21+
#include "access/table.h"
22+
#include "access/tableam.h"
1523

1624
HTAB *deactivated_queries = NULL;
1725

utils.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
#include "aqo.h"
2-
3-
/*****************************************************************************
1+
/*
2+
*******************************************************************************
43
*
54
* UTILITIES
65
*
7-
*****************************************************************************/
6+
*******************************************************************************
7+
*
8+
* Copyright (c) 2016-2020, Postgres Professional
9+
*
10+
* IDENTIFICATION
11+
* aqo/utils.c
12+
*
13+
*/
14+
15+
#include "aqo.h"
816

917
/* TODO: get rid of those static vars */
1018
static void *argsort_a;

0 commit comments

Comments
 (0)