Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5c5f37a

Browse files
committed
Merge with PGPROEE9_6 branch
2 parents1e1d98d +e94b639 commit5c5f37a

File tree

65 files changed

+4881
-1331
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+4881
-1331
lines changed

‎.gitlab-ci.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

‎contrib/aqo/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ DATA = aqo--1.0.sql
77
OBJS = aqo.o auto_tuning.o cardinality_estimation.o cardinality_hooks.o\
88
hash.o machine_learning.o path_utils.o postprocessing.o preprocessing.o\
99
selectivity_cache.o storage.o utils.o$(WIN32RES)
10-
REGRESS = aqo_disabledaqo_manual aqo_intelligent aqo_forced
10+
REGRESS = aqo_disabledaqo_controlled aqo_intelligent aqo_forced
1111

1212
MODULE_big = aqo
1313
ifdefUSE_PGXS

‎contrib/aqo/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ of per-connection.
2121
##Usage
2222

2323
Note that the extension works bad with dynamically generated views. If they
24-
appear in workload, please use "aqo.mode='manual'".
24+
appear in workload, please use "aqo.mode='controlled'".
2525

2626
This extension has intelligent self-tuning mode. If you want to rely completely
2727
on it, just add line "aqo.mode = 'intelligent'" into your postgresql.conf.
@@ -36,8 +36,8 @@ For handling workloads with dynamically generated query structures the forced
3636
mode "aqo.mode = 'forced'" is provided. We cannot guarantee performance
3737
improvement with this mode, but you may try it nevertheless.
3838

39-
If you want to completely control how PostgreSQL optimizes queries, usemanual
40-
mode "aqo.mode = 'manual'" and
39+
If you want to completely control how PostgreSQL optimizes queries, usecontrolled
40+
mode "aqo.mode = 'controlled'" and
4141
contrib/aqo/learn_queries.sh file_with_sql_queries.sql "psql -d YOUR_DATABASE"
4242
where file_with_sql_queries.sql is a textfile with queries on which AQO is
4343
supposed to learn. Please use only SELECT queries file_with_sql_queries.sql.

‎contrib/aqo/aqo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ intaqo_mode;
1212
staticconststructconfig_enum_entryformat_options[]= {
1313
{"intelligent",AQO_MODE_INTELLIGENT, false},
1414
{"forced",AQO_MODE_FORCED, false},
15-
{"manual",AQO_MODE_MANUAL, false},
15+
{"controlled",AQO_MODE_CONTROLLED, false},
1616
{"disabled",AQO_MODE_DISABLED, false},
1717
{NULL,0, false}
1818
};
@@ -74,7 +74,7 @@ _PG_init(void)
7474
"Mode of aqo usage.",
7575
NULL,
7676
&aqo_mode,
77-
AQO_MODE_MANUAL,
77+
AQO_MODE_CONTROLLED,
7878
format_options,
7979
PGC_SUSET,
8080
0,

‎contrib/aqo/aqo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* "forced" mode makes no difference between query types and use AQO for them
3535
* all in the similar way. It considers each new query type as linked to special
3636
* feature space called COMMON with hash 0.
37-
* "manual" mode ignores unknown query types. In this case AQO is completely
37+
* "Controlled" mode ignores unknown query types. In this case AQO is completely
3838
* configured manually by user.
3939
* Current mode is stored in aqo.mode variable.
4040
*
@@ -148,7 +148,7 @@ typedef enum
148148
/* Treats new query types as linked to the common feature space */
149149
AQO_MODE_FORCED,
150150
/* New query types are not linked with any feature space */
151-
AQO_MODE_MANUAL,
151+
AQO_MODE_CONTROLLED,
152152
/* Aqo is disabled for all queries */
153153
AQO_MODE_DISABLED,
154154
}AQO_MODE;

‎contrib/aqo/expected/aqo_manual.outrenamed to‎contrib/aqo/expected/aqo_controlled.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ AS (
2626
CREATE INDEX aqo_test2_idx_a ON aqo_test2 (a);
2727
ANALYZE aqo_test2;
2828
CREATE EXTENSION aqo;
29-
SET aqo.mode = 'manual';
29+
SET aqo.mode = 'controlled';
3030
EXPLAIN (COSTS FALSE)
3131
SELECT * FROM aqo_test0
3232
WHERE a < 3 AND b < 3 AND c < 3 AND d < 3;
@@ -105,7 +105,7 @@ SELECT count(*) FROM tmp1;
105105
(1 row)
106106

107107
DROP TABLE tmp1;
108-
SET aqo.mode = 'manual';
108+
SET aqo.mode = 'controlled';
109109
UPDATE aqo_queries SET auto_tuning=false;
110110
UPDATE aqo_queries SET learn_aqo=true;
111111
UPDATE aqo_queries SET use_aqo=false;

‎contrib/aqo/expected/aqo_disabled.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ SELECT count(*) FROM tmp1;
8383
(1 row)
8484

8585
DROP TABLE tmp1;
86-
SET aqo.mode = 'manual';
86+
SET aqo.mode = 'controlled';
8787
UPDATE aqo_queries SET learn_aqo = true, use_aqo = true, auto_tuning = false;
8888
EXPLAIN SELECT * FROM aqo_test0
8989
WHERE a < 3 AND b < 3 AND c < 3 AND d < 3;

‎contrib/aqo/expected/aqo_forced.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ AS (
1717
CREATE INDEX aqo_test1_idx_a ON aqo_test1 (a);
1818
ANALYZE aqo_test1;
1919
CREATE EXTENSION aqo;
20-
SET aqo.mode = 'manual';
20+
SET aqo.mode = 'controlled';
2121
EXPLAIN (COSTS FALSE)
2222
SELECT * FROM aqo_test0
2323
WHERE a < 3 AND b < 3 AND c < 3 AND d < 3;

‎contrib/aqo/expected/aqo_intelligent.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ SELECT count(*) FROM tmp1;
296296
(1 row)
297297

298298
DROP TABLE tmp1;
299-
SET aqo.mode = 'manual';
299+
SET aqo.mode = 'controlled';
300300
UPDATE aqo_queries SET learn_aqo = false, use_aqo = false, auto_tuning = false;
301301
EXPLAIN SELECT * FROM aqo_test0
302302
WHERE a < 3 AND b < 3 AND c < 3 AND d < 3;

‎contrib/aqo/preprocessing.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*typing strategy by changing hash function.
2727
* 2. New query type proceeding. The handling policy for new query types is
2828
*contained in variable 'aqo.mode'. It accepts three values:
29-
*"intelligent", "forced", and "manual".
29+
*"intelligent", "forced","controlled"and "disabled".
3030
*Intelligent linking strategy means that for each new query type the new
3131
*separate feature space is created. The hash of new feature space is
3232
*set the same as the hash of new query type. Auto tuning is on by
@@ -35,10 +35,11 @@
3535
*Forced linking strategy means that every new query type is linked to
3636
*the common feature space with hash 0, but we don't memorize
3737
*the hash and the settings for this query.
38-
*Manual linking strategy means that new query types do not induce new
39-
*feature spaces neither interact AQO somehow. In this mode the
38+
*Controlled linking strategy means that new query types do not induce
39+
*newfeature spaces neither interact AQO somehow. In this mode the
4040
*configuration of settings for different query types lies completely on
4141
*user.
42+
*Disabled strategy means that AQO is disabled for all queries.
4243
* 3. For given query type we determine its query_hash, use_aqo, learn_aqo,
4344
*fspace_hash and auto_tuning parameters.
4445
* 4. For given fspace_hash we may use its machine learning settings, but now
@@ -143,9 +144,9 @@ aqo_planner(Query *parse,
143144
use_aqo= true;
144145
auto_tuning= false;
145146
fspace_hash=0;
146-
collect_stat=true;
147+
collect_stat=false;
147148
break;
148-
caseAQO_MODE_MANUAL:
149+
caseAQO_MODE_CONTROLLED:
149150
adding_query= false;
150151
learn_aqo= false;
151152
use_aqo= false;

‎contrib/aqo/sql/aqo_manual.sqlrenamed to‎contrib/aqo/sql/aqo_controlled.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ ANALYZE aqo_test2;
3030

3131
CREATE EXTENSION aqo;
3232

33-
SETaqo.mode='manual';
33+
SETaqo.mode='controlled';
3434

3535
EXPLAIN (COSTS FALSE)
3636
SELECT*FROM aqo_test0
@@ -75,7 +75,7 @@ WHERE t1.a = t2.b AND t2.a = t3.b AND t3.a = t4.b;
7575
SELECTcount(*)FROM tmp1;
7676
DROPTABLE tmp1;
7777

78-
SETaqo.mode='manual';
78+
SETaqo.mode='controlled';
7979
UPDATE aqo_queriesSET auto_tuning=false;
8080

8181
UPDATE aqo_queriesSET learn_aqo=true;

‎contrib/aqo/sql/aqo_disabled.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ WHERE t1.a < 1 AND t3.b < 1 AND t2.c < 1 AND t3.d < 0 AND t1.a = t2.a AND t1.b =
5353
SELECTcount(*)FROM tmp1;
5454
DROPTABLE tmp1;
5555

56-
SETaqo.mode='manual';
56+
SETaqo.mode='controlled';
5757

5858
UPDATE aqo_queriesSET learn_aqo= true, use_aqo= true, auto_tuning= false;
5959

‎contrib/aqo/sql/aqo_forced.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ANALYZE aqo_test1;
2020

2121
CREATE EXTENSION aqo;
2222

23-
SETaqo.mode='manual';
23+
SETaqo.mode='controlled';
2424

2525
EXPLAIN (COSTS FALSE)
2626
SELECT*FROM aqo_test0

‎contrib/aqo/sql/aqo_intelligent.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ WHERE t1.a = t2.b AND t2.a = t3.b AND t3.a = t4.b;
147147
SELECTcount(*)FROM tmp1;
148148
DROPTABLE tmp1;
149149

150-
SETaqo.mode='manual';
150+
SETaqo.mode='controlled';
151151

152152
UPDATE aqo_queriesSET learn_aqo= false, use_aqo= false, auto_tuning= false;
153153

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp