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

Stable13 #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
danolivo merged 20 commits into postgrespro:stable13 from Alena0704:stable13
Jun 13, 2021
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
197145a
Prevent distributed deadlocks. Disable AQO for FDW queries.
danolivo Dec 3, 2020
626d5ee
Allow learning (and predicting for) on a ForeignScan, an Append, a Me...
danolivo Dec 4, 2020
386cd6d
Add support of postgres_fdw push-down.
danolivo Dec 4, 2020
0cd3ce3
Process GatherMergePath in get_path_clauses routine.
danolivo Dec 15, 2020
e8dcb5b
Add a foreign relation estimation hook into the core patch and AQO.
danolivo Jan 15, 2021
38d4f77
Add basic regression test on FDW support.
danolivo Jan 15, 2021
8291220
Add missed aqo_fdw.sql
danolivo Jan 19, 2021
9aff621
Prepare the insert_index routine for PGv14 signature
danolivo Jan 18, 2021
36c97ac
Change the license sentence in accordance with 2021.
danolivo Jan 19, 2021
34c640d
Fix the state:
danolivo Jan 19, 2021
fbf27d6
Rename aqo.details to aqo.show_details.
danolivo Jan 20, 2021
d8e18ce
Update the readme file in accordance with the new AQO version.
danolivo Jan 20, 2021
418c7d4
Bugfix of the aqo_fdw regress test
danolivo Jan 20, 2021
505c064
Update README.md
danolivo Feb 6, 2021
453bef5
Rename the aqo_details to aqo_show_details
danolivo Feb 18, 2021
d705b5d
Store selectivity cache data in the cache memory context instead of
danolivo Feb 18, 2021
2b20ff0
Change insert/update scheme for the ML-knowledge base.
danolivo Feb 18, 2021
436b3e6
Improve AQO makefile
danolivo Feb 18, 2021
8ec6572
Bugfix: don't create ignorance table in parallel worker.
danolivo Feb 18, 2021
d339ad0
Make the explain of AQO more readable.
danolivo Mar 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update the readme file in accordance with the new AQO version.
  • Loading branch information
danolivo authored and Alena0704 committed Jun 12, 2021
commit d8e18cedaab28e84971a44bddebbd34c8f0dae11
21 changes: 15 additions & 6 deletions README.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ complicated queries.
## Installation

The module works with PostgreSQL 9.6 and above.
To avoid compatibility issues, the following branches in the git-repository are allocated:
* `stable9_6`.
* `stable11` - for PG v10 and v11.
* `stable12` - for PG v12.
* the `master` branch of the AQO repository correctly works with PGv13 and the PostgreSQL `master` branch.

The module contains a patch and an extension. Patch has to be applied to the
sources of PostgresSQL. Patch affects header files, that is why PostgreSQL
Expand All @@ -28,7 +33,7 @@ make check # check whether it works
```

Tag `version` at the patch name corresponds to suitable PostgreSQL release.
For PostgreSQL 10 use aqo_pg10.patch; for PostgreSQL 11 use aqo_pg11.patch and so on.
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.
Also, you can see git tags at the master branch for more accurate definition of
suitable PostgreSQL version.

Expand All @@ -50,7 +55,7 @@ of per-database.

The typical case is follows: you have complicated query, which executes too
long. `EXPLAIN ANALYZE` shows, that the possible reason is bad cardinality
estimnation.
estimation.

Example:
```
Expand Down Expand Up @@ -127,16 +132,16 @@ When the plan stops changing, you can often observe performance improvement:
(23 rows)
```

The settings system in AQO works with normalized queries, i. e. queries with
removed constants. For example, the normalized version of
The settings system in AQO works with normalised queries, i. e. queries with
removed constants. For example, the normalised version of
`SELECT * FROM tbl WHERE a < 25 AND b = 'str';`
is
`SELECT * FROM tbl WHERE a < CONST and b = CONST;`

So the queries have equal normalization if and only if they differ only
So the queries have equal normalisation if and only if they differ only
in their constants.

Each normalized query has its own hash. The correspondence between normalized
Each normalised query has its own hash. The correspondence between normalised
query hash and query text is stored in aqo_query_texts table:
```
SELECT * FROM aqo_query_texts;
Expand Down Expand Up @@ -174,6 +179,10 @@ if the data tends to change significantly), you can do
`UPDATE SET aqo_learn=false WHERE query_hash = <query_hash>;`
before commit.

The extension includes two GUC's to display the executed cardinality predictions for a query.
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.
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.

The more detailed reference of AQO settings mechanism is available further.

## Advanced tuning
Expand Down

AltStyle によって変換されたページ (->オリジナル) /