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

Commitc89d507

Browse files
committed
Round rowcount estimate for a partial path to an integer.
I'd been wondering why I was sometimes seeing fractional rowcountestimates in parallel-query situations, and this seems to be thereason. (You won't see the fractional parts in EXPLAIN, because itprints rowcounts with %.0f, but they are apparent in the debugger.)A fractional rowcount is not any saner for a partial path than anyother kind of path, and it's equally likely to break cost estimationfor higher paths, so apply clamp_row_est() like we do in other places.
1 parent3a4a33a commitc89d507

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/optimizer/path/costsize.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ cost_seqscan(Path *path, PlannerInfo *root,
263263
* because they'll anticipate receiving more rows than any given copy
264264
* will actually get.
265265
*/
266-
path->rows/=parallel_divisor;
266+
path->rows=clamp_row_est(path->rows /parallel_divisor);
267267

268268
/* The CPU cost is divided among all the workers. */
269269
cpu_run_cost /=parallel_divisor;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp