-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change, long overdue, fixes dozens of typos and grammar mistakes, and improves the overall quality of the documentation of the project. A spell checker has detected some mistakes, but a lot of sentences were grammatically wrong, so a lot of them have been simply rewritten. On top of the grammar and the typos, I have also changed the table layouts to ignore the indentation, which was kind of hard to cope with and each table has only up to three columns. Markdown does not care about that, as well. All of these have been spotted by me, though some of them may have been mentioned in other reports in the past. The SQL query layouts are simplified, being now much easier to copy-paste from the docs if one wishes to test them. Backpatch-through: 14
- Loading branch information
Showing
12 changed files
with
282 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,27 @@ | ||
# Errors | ||
|
||
`pg_hint_plan` stops parsing on any error and uses hints already parsed on the | ||
most cases. Following are the typical errors. | ||
`pg_hint_plan` stops hint parsing on any error and will uses the hints | ||
already parsed. Here are some typical errors. | ||
|
||
## Syntax errors | ||
|
||
Any syntactical errors or wrong hint names are reported as a syntax error. | ||
These errors are reported in the server log with the message level specified by | ||
`pg_hint_plan.message_level` if `pg_hint_plan.debug_print` is on and above. | ||
These errors are reported in the server log with the message level specified | ||
by `pg_hint_plan.message_level` if `pg_hint_plan.debug_print` is on and | ||
above. | ||
|
||
## Object misspecifications | ||
## Incorrect Object definitions | ||
|
||
Object misspecifications result in silent ignorance of the hints. This kind of | ||
error is reported as "not used hints" in the server log by the same condition | ||
as syntax errors. | ||
Incorrect object definitions result in silently ignoring the hints. This kind | ||
of error is reported as a "Not Used Hint" in the server logs. | ||
|
||
## Redundant or conflicting hints | ||
|
||
The last hint will be active when redundant hints or hints conflicting with | ||
each other. This kind of error is reported as "duplication hints" in the server | ||
log by the same condition to syntax errors. | ||
The last hint is considered when redundant hints are defined or hints | ||
conflict with each other. This kind of error is reported as a duplicated | ||
hints. | ||
|
||
## Nested comments | ||
|
||
Hint comment cannot include another block comment within. If `pg_hint_plan` | ||
finds it, differently from other erros, it stops parsing and abandans all hints | ||
already parsed. This kind of error is reported in the same manner as other | ||
errors. | ||
Hint comments cannot be recursive. If detected, hint parsing is immediately | ||
stopped and all the hints already parsed are ignored. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
# Functional limitations | ||
|
||
## Influences of some of planner GUC parameters | ||
## Influence of planner GUC parameters | ||
|
||
The planner does not try to consider joining order for FROM clause entries more | ||
than `from_collapse_limit`. `pg_hint_plan` cannot affect joining order as | ||
expected for the case. | ||
The planner does not try to consider joining order for FROM clause entries | ||
more than `from_collapse_limit`. `pg_hint_plan` cannot affect the joining | ||
order in this case. | ||
|
||
## Hints trying to enforce unexecutable plans | ||
## Hints trying to enforce non-executable plans | ||
|
||
Planner chooses any executable plans when the enforced plan cannot be executed. | ||
Planner chooses any executable plans when the enforced plan cannot be | ||
executed: | ||
|
||
- `FULL OUTER JOIN` to use nested loop | ||
- To use indexes that does not have columns used in quals | ||
- To do TID scans for queries without ctid conditions | ||
- `FULL OUTER JOIN` to use nested loop. | ||
- Use of indexes that do not have columns used in quals. | ||
- TID scans for queries without ctid conditions. | ||
|
||
## Queries in ECPG | ||
|
||
ECPG removes comments in queries written as embedded SQLs so hints cannot be | ||
passed form those queries. The only exception is that `EXECUTE` command passes | ||
given string unmodifed. Please consider using the hint table in the case. | ||
ECPG removes comments in queries written as embedded SQLs so hints cannot | ||
be passed to it. The only exception `EXECUTE`, that passes the query string | ||
to the server as-is. The hint table can be used in the case. | ||
|
||
## Work with `pg_stat_statements` | ||
## `pg_stat_statements` | ||
|
||
`pg_stat_statements` generates a query id ignoring comments. As the result, the | ||
identical queries with different hints are summarized as the same query. | ||
`pg_stat_statements` generates a query ID, ignoring comments. Hence, | ||
queries with different hints, still written the same way, may compute the | ||
same query ID. |
Oops, something went wrong.