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

Commit87027cb

Browse files
committed
Clarify the 'rows' parameter in create_append_path
This is extracted from a larger patch to improve the UNION planner.While working on that, I found myself having to check what the 'rows'parameter is for. It's not obvious that passing a negative number is theway to have the rows estimate calculated and to find that out you needto read code in create_append_path() and in cost_append().Discussion:https://postgr.es/m/CAApHDvpb_63XQodmxKUF8vb9M7CxyUyT4sWvEgqeQU-GB7QFoQ@mail.gmail.com
1 parent8fd0498 commit87027cb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/backend/optimizer/util/pathnode.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,6 +1237,10 @@ create_tidrangescan_path(PlannerInfo *root, RelOptInfo *rel,
12371237
*
12381238
* Note that we must handle subpaths = NIL, representing a dummy access path.
12391239
* Also, there are callers that pass root = NULL.
1240+
*
1241+
* 'rows', when passed as a non-negative number, will be used to overwrite the
1242+
* returned path's row estimate. Otherwise, the row estimate is calculated
1243+
* by totalling the row estimates from the 'subpaths' list.
12401244
*/
12411245
AppendPath*
12421246
create_append_path(PlannerInfo*root,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp