Skip to content

Commit 0fcffc5

Browse files
author
Commitfest Bot
committed
[CF 5719] v9 - MergeAppend could consider sorting cheapest child path
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5719 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/[email protected] Author(s): Andrei Lepikhov, Alexander Pyhalov
2 parents 5c8eda1 + 6e59752 commit 0fcffc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/optimizer/path/costsize.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ cost_gather_merge(GatherMergePath *path, PlannerInfo *root,
512512
logN = LOG2(N);
513513

514514
/* Assumed cost per tuple comparison */
515-
comparison_cost = 2.0 * cpu_operator_cost;
515+
comparison_cost = 3.9 * cpu_operator_cost;
516516

517517
/* Heap creation cost */
518518
startup_cost += comparison_cost * N * logN;
@@ -2474,7 +2474,7 @@ cost_merge_append(Path *path, PlannerInfo *root,
24742474
logN = LOG2(N);
24752475

24762476
/* Assumed cost per tuple comparison */
2477-
comparison_cost = 2.0 * cpu_operator_cost;
2477+
comparison_cost = 3.9 * cpu_operator_cost;
24782478

24792479
/* Heap creation cost */
24802480
startup_cost += comparison_cost * N * logN;

0 commit comments

Comments
 (0)