@@ -6,9 +6,22 @@ for improving cardinality estimation. Experimental evaluation shows that this
6
6
improvement sometimes provides an enormously large speed-up for rather
7
7
complicated queries.
8
8
9
+ ## Docker container
10
+ For quick look into the query-driven adaptive query optimization you can use
11
+ docker container defined by ` Dockerfile ` and ` docker-entrypoint.sh ` files.
12
+
13
+ Frequently used commands:
14
+ * docker build -t aqo . # Build an image
15
+ * docker run -d -p 5432:5432 aqo # Run a container
16
+ * docker exec -it ` <CONTAINER_ID> ` bash # Open command prompt in the container
17
+ Now, you can use ` psql ` .
18
+
9
19
## Installation
10
20
11
- The module works with PostgreSQL 9.6 and above.
21
+ The module works with PostgreSQL 9.6 and above. You need to use appropriate
22
+ branch from git repository. The repository contains branch ` master ` corresponding
23
+ to current PostgreSQL master branch, and a number of branches called ` stable9_6 `
24
+ ` stable11 ` and ` stable12 ` . The branch ` stable11 ` can be used with PostgreSQL 10 too.
12
25
13
26
The module contains a patch and an extension. Patch has to be applied to the
14
27
sources of PostgresSQL. Patch affects header files, that is why PostgreSQL
@@ -18,16 +31,19 @@ Extension has to be unpacked into contrib directory and then to be compiled and
18
31
installed with ` make install ` .
19
32
20
33
```
21
- cd postgresql-9.6 # enter postgresql source directory
22
- git clone https://github.com/tigvarts /aqo.git contrib/aqo # clone aqo into contrib
23
- patch -p1 --no-backup-if-mismatch < contrib/aqo/aqo_pg9_6 .patch # patch postgresql
24
- make clean && make && make install # recompile postgresql
25
- cd contrib/aqo # enter aqo directory
26
- make && make install # install aqo
27
- make check # check whether it works correctly (optional)
34
+ cd postgresql-9.6 # enter postgresql source directory
35
+ git clone https://github.com/postgrespro /aqo.git # clone aqo into contrib
36
+ patch -p1 --no-backup-if-mismatch < contrib/aqo/aqo_pg<ver> .patch # patch postgresql
37
+ make clean && make && make install # recompile postgresql
38
+ cd contrib/aqo # enter aqo directory
39
+ make && make install # install aqo
40
+ make check # check whether it works correctly (optional)
28
41
```
29
42
30
- For PostgreSQL 10 and above use aqo_pg10.patch instead of aqo_pg9_6.patch
43
+ Tag ` ver ` at the patch name corresponds to suitable PostgreSQL release.
44
+ For PostgreSQL 10 use aqo_pg10.patch; for PostgreSQL 11 use aqo_pg11.patch and so on.
45
+ Also, you can see git tags at the master branch for more accurate definition of
46
+ suitable PostgreSQL version.
31
47
32
48
In your database:
33
49
0 commit comments