You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-6
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,11 @@ complicated queries.
9
9
## Installation
10
10
11
11
The module works with PostgreSQL 9.6 and above.
12
+
To avoid compatibility issues, the following branches in the git-repository are allocated:
13
+
*`stable9_6`.
14
+
*`stable11` - for PG v10 and v11.
15
+
*`stable12` - for PG v12.
16
+
* the `master` branch of the AQO repository correctly works with PGv13 and the PostgreSQL `master` branch.
12
17
13
18
The module contains a patch and an extension. Patch has to be applied to the
14
19
sources of PostgresSQL. Patch affects header files, that is why PostgreSQL
@@ -28,7 +33,7 @@ make check # check whether it works
28
33
```
29
34
30
35
Tag `version` at the patch name corresponds to suitable PostgreSQL release.
31
-
For PostgreSQL 10 use aqo_pg10.patch; for PostgreSQL 11 use aqo_pg11.patch and so on.
36
+
For PostgreSQL 9.6 use the 'aqo_pg9_6.patch' file; PostgreSQL 10 use aqo_pg10.patch; for PostgreSQL 11 use aqo_pg11.patch and so on.
32
37
Also, you can see git tags at the master branch for more accurate definition of
33
38
suitable PostgreSQL version.
34
39
@@ -50,7 +55,7 @@ of per-database.
50
55
51
56
The typical case is follows: you have complicated query, which executes too
52
57
long. `EXPLAIN ANALYZE` shows, that the possible reason is bad cardinality
53
-
estimnation.
58
+
estimation.
54
59
55
60
Example:
56
61
```
@@ -127,16 +132,16 @@ When the plan stops changing, you can often observe performance improvement:
127
132
(23 rows)
128
133
```
129
134
130
-
The settings system in AQO works with normalized queries, i. e. queries with
131
-
removed constants. For example, the normalized version of
135
+
The settings system in AQO works with normalised queries, i. e. queries with
136
+
removed constants. For example, the normalised version of
132
137
`SELECT * FROM tbl WHERE a < 25 AND b = 'str';`
133
138
is
134
139
`SELECT * FROM tbl WHERE a < CONST and b = CONST;`
135
140
136
-
So the queries have equal normalization if and only if they differ only
141
+
So the queries have equal normalisation if and only if they differ only
137
142
in their constants.
138
143
139
-
Each normalized query has its own hash. The correspondence between normalized
144
+
Each normalised query has its own hash. The correspondence between normalised
140
145
query hash and query text is stored in aqo_query_texts table:
141
146
```
142
147
SELECT * FROM aqo_query_texts;
@@ -174,6 +179,10 @@ if the data tends to change significantly), you can do
174
179
`UPDATE SET aqo_learn=false WHERE query_hash = <query_hash>;`
175
180
before commit.
176
181
182
+
The extension includes two GUC's to display the executed cardinality predictions for a query.
183
+
The `aqo.show_details = 'on'` (default - off) allows to see the aqo cardinality prediction results for each node of a query plan and an AQO summary.
184
+
The `aqo.show_hash = 'on'` (default - off) will print hash signature for each plan node and overall query. It is system-specific information and should be used for situational analysis.
185
+
177
186
The more detailed reference of AQO settings mechanism is available further.
0 commit comments