summaryrefslogtreecommitdiff
path: root/src/test/regress/expected/subselect.out
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2018-02-21 23:09:27 -0500
committerRobert Haas <rhaas@postgresql.org>2018-02-21 23:09:27 -0500
commit7d8ac9814bc9bb6df2d845dbabed38d7284c7c2c (patch)
tree0851a4ef0e1a7194ed8338a7ba82973bc6262f01 /src/test/regress/expected/subselect.out
parent38b41f182a66b67e36e2adf53d078599b1b65483 (diff)
downloadpostgresql-7d8ac9814bc9bb6df2d845dbabed38d7284c7c2c.tar.gz
Charge cpu_tuple_cost * 0.5 for Append and MergeAppend nodes.
Previously, Append didn't charge anything at all, and MergeAppend charged only cpu_operator_cost, about half the value used here. This change might make MergeAppend plans slightly more likely to be chosen than before, since this commit increases the assumed cost for Append -- with default values -- by 0.005 per tuple but MergeAppend by only 0.0025 per tuple. Since the comparisons required by MergeAppend are costed separately, it's not clear why MergeAppend needs to be otherwise more expensive than Append, so hopefully this is OK. Prior to partition-wise join, it didn't really matter whether or not an Append node had any cost of its own, because every plan had to use the same number of Append or MergeAppend nodes and in the same places. Only the relative cost of Append vs. MergeAppend made a difference. Now, however, it is possible to avoid some of the Append nodes using a partition-wise join, so it's worth making an effort. Pending patches for partition-wise aggregate care too, because an Append of Aggregate nodes will incur the Append overhead fewer times than an Aggregate over an Append. Although in most cases this change will favor the use of partition-wise techniques, it does the opposite when the join cardinality is greater than the sum of the input cardinalities. Since this situation arises in an existing regression test, I [rhaas] adjusted it to keep the overall plan shape approximately the same. Jeevan Chalke, per a suggestion from David Rowley. Reviewed by Ashutosh Bapat. Some changes by me. The larger patch series of which this patch is a part was also reviewed and tested by Antonin Houska, Rajkumar Raghuwanshi, David Rowley, Dilip Kumar, Konstantin Knizhnik, Pascal Legrand, Rafia Sabih, and me. Discussion: http://postgr.es/m/CAKJS1f9UXdk6ZYyqbJnjFO9a9hyHKGW7B=ZRh-rxy9qxfPA5Gw@mail.gmail.com
Diffstat (limited to 'src/test/regress/expected/subselect.out')
-rw-r--r--src/test/regress/expected/subselect.out4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/regress/expected/subselect.out b/src/test/regress/expected/subselect.out
index 4b893856cf..3b2bf3273e 100644
--- a/src/test/regress/expected/subselect.out
+++ b/src/test/regress/expected/subselect.out
@@ -235,7 +235,7 @@ SELECT *, pg_typeof(f1) FROM
explain verbose select '42' union all select '43';
QUERY PLAN
-------------------------------------------------
- Append (cost=0.00..0.04 rows=2 width=32)
+ Append (cost=0.00..0.05 rows=2 width=32)
-> Result (cost=0.00..0.01 rows=1 width=32)
Output: '42'::text
-> Result (cost=0.00..0.01 rows=1 width=32)
@@ -245,7 +245,7 @@ explain verbose select '42' union all select '43';
explain verbose select '42' union all select 43;
QUERY PLAN
------------------------------------------------
- Append (cost=0.00..0.04 rows=2 width=4)
+ Append (cost=0.00..0.05 rows=2 width=4)
-> Result (cost=0.00..0.01 rows=1 width=4)
Output: 42
-> Result (cost=0.00..0.01 rows=1 width=4)