You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by st...@apache.org on 2024/08/13 21:49:38 UTC

(impala) 39/45: IMPALA-13119: Fix cost_ initialization at CostingSegment.java

This is an automated email from the ASF dual-hosted git repository.

stigahuang pushed a commit to branch branch-4.4.1
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 960b65fd14cba8cce8c0db76aa3f74a98fc2bff4
Author: Riza Suminto <ri...@cloudera.com>
AuthorDate: Thu May 30 15:26:45 2024 -0700

    IMPALA-13119: Fix cost_ initialization at CostingSegment.java
    
    This patch fix cost_ initialization of CostingSegment. The public
    constructor should initialize cost_ with ProcessingCost directly taken
    from PlanNode or DataSink parameter. The private constructor still
    initialize cost_ with ProcessingCost.zero().
    
    Testing:
    - Add TpcdsCpuCostPlannerTest#testQ43Verbose
      Verify that "#cons:#prod" is correct in verbose profile.
    - Pass FE tests TpcdsCpuCostPlannerTest, PlannerTest#testProcessingCost,
      and PlannerTest#testProcessingCostPlanAdmissionSlots
    - Pass test_executor_groups.py
    
    Change-Id: I5b3c99c87a1d0a08edc8d276cf33d709bd39fe14
    Reviewed-on: http://gerrit.cloudera.org:8080/21468
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 .../org/apache/impala/planner/CostingSegment.java  |  19 +-
 .../impala/planner/TpcdsCpuCostPlannerTest.java    |   5 +
 .../PlannerTest/tpcds_cpu_cost/tpcds-q17.test      | 124 +++----
 .../PlannerTest/tpcds_cpu_cost/tpcds-q18.test      |  38 +--
 .../PlannerTest/tpcds_cpu_cost/tpcds-q22.test      |  40 +--
 .../PlannerTest/tpcds_cpu_cost/tpcds-q24a.test     | 180 +++++-----
 .../PlannerTest/tpcds_cpu_cost/tpcds-q24b.test     | 180 +++++-----
 .../PlannerTest/tpcds_cpu_cost/tpcds-q25.test      | 114 +++----
 .../PlannerTest/tpcds_cpu_cost/tpcds-q29.test      | 140 ++++----
 .../PlannerTest/tpcds_cpu_cost/tpcds-q40.test      |  84 ++---
 .../tpcds_cpu_cost/tpcds-q43-verbose.test          | 199 +++++++++++
 .../PlannerTest/tpcds_cpu_cost/tpcds-q46.test      |  42 +--
 .../PlannerTest/tpcds_cpu_cost/tpcds-q49.test      | 116 +++----
 .../PlannerTest/tpcds_cpu_cost/tpcds-q50.test      | 100 +++---
 .../PlannerTest/tpcds_cpu_cost/tpcds-q51.test      |  32 +-
 .../PlannerTest/tpcds_cpu_cost/tpcds-q64.test      | 380 ++++++++++-----------
 .../PlannerTest/tpcds_cpu_cost/tpcds-q67.test      |  40 +--
 .../PlannerTest/tpcds_cpu_cost/tpcds-q80.test      | 240 ++++++-------
 .../PlannerTest/tpcds_cpu_cost/tpcds-q93.test      |  68 ++--
 .../PlannerTest/tpcds_cpu_cost/tpcds-q98.test      |  40 +--
 20 files changed, 1198 insertions(+), 983 deletions(-)

diff --git a/fe/src/main/java/org/apache/impala/planner/CostingSegment.java b/fe/src/main/java/org/apache/impala/planner/CostingSegment.java
index 1652b9893..634eea302 100644
--- a/fe/src/main/java/org/apache/impala/planner/CostingSegment.java
+++ b/fe/src/main/java/org/apache/impala/planner/CostingSegment.java
@@ -53,17 +53,28 @@ public class CostingSegment extends TreeNode<CostingSegment> {
 
   // The ProcessingCost of this fragment segment, which is the sum of the processing cost
   // of all nodes in nodes_ and sink_ (if set).
-  private ProcessingCost cost_ = ProcessingCost.zero();
+  // Initialized at constructor.
+  private ProcessingCost cost_;
 
   // DataSink associated with this segment.
   // Must not be null for output segment.
   private DataSink sink_ = null;
 
-  public CostingSegment(DataSink sink) { setSink(sink); }
+  public CostingSegment(DataSink sink) {
+    Preconditions.checkArgument(sink.getProcessingCost().isValid());
+    cost_ = sink.getProcessingCost();
+    sink_ = sink;
+  }
 
-  public CostingSegment(PlanNode node) { appendNode(node); }
+  public CostingSegment(PlanNode node) {
+    Preconditions.checkArgument(node.getProcessingCost().isValid());
+    cost_ = node.getProcessingCost();
+    nodes_.add(node);
+  }
 
-  private CostingSegment() {}
+  private CostingSegment() {
+    cost_ = ProcessingCost.zero();
+  }
 
   public ProcessingCost getProcessingCost() { return cost_; }
   public boolean isOutputSegment() { return sink_ != null; }
diff --git a/fe/src/test/java/org/apache/impala/planner/TpcdsCpuCostPlannerTest.java b/fe/src/test/java/org/apache/impala/planner/TpcdsCpuCostPlannerTest.java
index 24589774b..49f8100e2 100644
--- a/fe/src/test/java/org/apache/impala/planner/TpcdsCpuCostPlannerTest.java
+++ b/fe/src/test/java/org/apache/impala/planner/TpcdsCpuCostPlannerTest.java
@@ -630,4 +630,9 @@ public class TpcdsCpuCostPlannerTest extends PlannerTestBase {
   public void testQ99() {
     runPlannerTestFile("tpcds_cpu_cost/tpcds-q99", testDb, options, testOptions);
   }
+
+  @Test
+  public void testQ43Verbose() {
+    runPlannerTestFile("tpcds_cpu_cost/tpcds-q43-verbose", testDb, options, testOptions);
+  }
 }
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q17.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q17.test
index ff966462d..c93e81811 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q17.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q17.test
@@ -218,11 +218,11 @@ PLAN-ROOT SINK
    tuple-ids=2 row-size=16B cardinality=644.12M(filtered from 4.32G) cost=148404942
    in pipelines: 02(GETNEXT)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=1.77GB Threads=78
-Per-Host Resource Estimates: Memory=8.71GB
+Max Per-Host Resource Reservation: Memory=821.95MB Threads=58
+Per-Host Resource Estimates: Memory=7.04GB
 F11:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=4.22MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[1570] cpu-comparison-result=298 [max(1 (self) vs 298 (sum children))]
+|  max-parallelism=1 segment-costs=[1570] cpu-comparison-result=228 [max(1 (self) vs 228 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: i_item_id, i_item_desc, s_state, count(ss_quantity), avg(ss_quantity), stddev_samp(ss_quantity), stddev_samp(ss_quantity) / avg(ss_quantity), count(sr_return_quantity), avg(sr_return_quantity), stddev_samp(sr_return_quantity), stddev_samp(sr_return_quantity) / avg(sr_return_quantity), count(cs_quantity), avg(cs_quantity), stddev_samp(cs_quantity), stddev_samp(cs_quantity) / avg(cs_quantity)
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=1500
@@ -235,8 +235,8 @@ PLAN-ROOT SINK
 |  in pipelines: 16(GETNEXT)
 |
 F10:PLAN FRAGMENT [HASH(i_item_id,i_item_desc,s_state)] hosts=10 instances=10 (adjusted from 120)
-Per-Instance Resources: mem-estimate=157.29MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=10 segment-costs=[46282584, 77209102, 625] cpu-comparison-result=298 [max(10 (self) vs 298 (sum children))]
+Per-Instance Resources: mem-estimate=150.53MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=10 segment-costs=[46282584, 77209102, 625] cpu-comparison-result=228 [max(10 (self) vs 228 (sum children))]
 16:TOP-N [LIMIT=100]
 |  order by: i_item_id ASC, i_item_desc ASC, s_state ASC
 |  mem-estimate=22.13KB mem-reservation=0B thread-reservation=0
@@ -251,17 +251,17 @@ max-parallelism=10 segment-costs=[46282584, 77209102, 625] cpu-comparison-result
 |  in pipelines: 27(GETNEXT), 02(OPEN)
 |
 26:EXCHANGE [HASH(i_item_id,i_item_desc,s_state)]
-|  mem-estimate=19.01MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=12.25MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=8 row-size=227B cardinality=6.08M cost=7009532
 |  in pipelines: 02(GETNEXT)
 |
-F07:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=40 (adjusted from 120)
-Per-Instance Resources: mem-estimate=55.35MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298 [max(160 (self) vs 298 (sum children))]
+F07:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10 (adjusted from 120)
+Per-Instance Resources: mem-estimate=125.06MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=228 [max(130 (self) vs 228 (sum children))]
 15:AGGREGATE [STREAMING]
 |  output: count(ss_quantity), avg(CAST(ss_quantity AS BIGINT)), stddev_samp(ss_quantity), count(sr_return_quantity), avg(CAST(sr_return_quantity AS BIGINT)), stddev_samp(sr_return_quantity), count(cs_quantity), avg(CAST(cs_quantity AS BIGINT)), stddev_samp(cs_quantity)
 |  group by: i_item_id, i_item_desc, s_state
-|  mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=103.71MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=8 row-size=227B cardinality=6.08M cost=39273052
 |  in pipelines: 02(GETNEXT)
 |
@@ -274,13 +274,13 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  in pipelines: 02(GETNEXT), 06(OPEN)
 |
 |--F12:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=8.79MB mem-reservation=8.75MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=2.98MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[3140]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: s_store_sk
 |  |  runtime filters: RF000[bloom] <- s_store_sk, RF001[min_max] <- s_store_sk
-|  |  mem-estimate=7.75MB mem-reservation=7.75MB spill-buffer=64.00KB thread-reservation=0 cost=1350
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=1350
 |  |
 |  25:EXCHANGE [BROADCAST]
 |  |  mem-estimate=45.73KB mem-reservation=0B thread-reservation=0
@@ -309,13 +309,13 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  in pipelines: 02(GETNEXT), 05(OPEN)
 |
 |--F13:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=8.77MB mem-reservation=8.75MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[633]
 |  JOIN BUILD
 |  |  join-table-id=01 plan-id=02 cohort-id=01
 |  |  build expressions: d3.d_date_sk
 |  |  runtime filters: RF002[bloom] <- d3.d_date_sk
-|  |  mem-estimate=7.75MB mem-reservation=7.75MB spill-buffer=64.00KB thread-reservation=0 cost=273
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=273
 |  |
 |  24:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -346,22 +346,22 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  tuple-ids=2,0,3,1,4,7 row-size=257B cardinality=40.76M cost=172601792
 |  in pipelines: 02(GETNEXT), 00(OPEN)
 |
-|--F14:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=40 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=310.54MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
-|  |  max-parallelism=40 segment-costs=[96395086] cpu-comparison-result=276 [max(251 (self) vs 276 (sum children))]
+|--F14:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=1.03GB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
+|  |  max-parallelism=40 segment-costs=[96395086] cpu-comparison-result=206 [max(151 (self) vs 206 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=02 plan-id=03 cohort-id=01
 |  |  build expressions: sr_customer_sk, sr_item_sk
 |  |  runtime filters: RF004[bloom] <- sr_customer_sk, RF005[bloom] <- sr_item_sk, RF006[min_max] <- sr_customer_sk, RF007[min_max] <- sr_item_sk
-|  |  mem-estimate=253.00MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=40758026
+|  |  mem-estimate=1012.01MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=40758026
 |  |
 |  23:EXCHANGE [HASH(sr_customer_sk,sr_item_sk)]
-|  |  mem-estimate=40.54MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=22.72MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=0,3,1,4,7 row-size=241B cardinality=40.76M cost=55637060
 |  |  in pipelines: 00(GETNEXT)
 |  |
-|  F04:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  Per-Instance Resources: mem-estimate=55.87MB mem-reservation=0B thread-reservation=1
+|  F04:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=50 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=25.33MB mem-reservation=0B thread-reservation=1
 |  max-parallelism=120 segment-costs=[1166235430]
 |  11:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=03
@@ -372,13 +372,13 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  |  in pipelines: 00(GETNEXT), 07(OPEN)
 |  |
 |  |--F15:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=419.58MB mem-reservation=409.00MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=181.58MB mem-reservation=171.00MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[838440]
 |  |  JOIN BUILD
 |  |  |  join-table-id=03 plan-id=04 cohort-id=02
 |  |  |  build expressions: i_item_sk
 |  |  |  runtime filters: RF008[bloom] <- i_item_sk, RF009[min_max] <- i_item_sk
-|  |  |  mem-estimate=408.00MB mem-reservation=408.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
+|  |  |  mem-estimate=170.00MB mem-reservation=170.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
 |  |  |
 |  |  21:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.58MB mem-reservation=0B thread-reservation=0
@@ -407,13 +407,13 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  |  in pipelines: 00(GETNEXT), 04(OPEN)
 |  |
 |  |--F16:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=24.27MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=10.70MB mem-reservation=10.69MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[633]
 |  |  JOIN BUILD
 |  |  |  join-table-id=04 plan-id=05 cohort-id=02
 |  |  |  build expressions: d2.d_date_sk
 |  |  |  runtime filters: RF010[bloom] <- d2.d_date_sk
-|  |  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=273
+|  |  |  mem-estimate=9.69MB mem-reservation=9.69MB spill-buffer=64.00KB thread-reservation=0 cost=273
 |  |  |
 |  |  20:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -444,14 +444,14 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  |  tuple-ids=0,3,1 row-size=74B cardinality=299.34M cost=164804646
 |  |  in pipelines: 00(GETNEXT), 01(OPEN)
 |  |
-|  |--F17:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  |  |  Per-Instance Resources: mem-estimate=415.87MB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
+|  |--F17:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=50 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=933.30MB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
 |  |  |  max-parallelism=120 segment-costs=[1055362113]
 |  |  JOIN BUILD
 |  |  |  join-table-id=05 plan-id=06 cohort-id=02
 |  |  |  build expressions: sr_customer_sk, sr_item_sk, sr_ticket_number
 |  |  |  runtime filters: RF012[bloom] <- sr_customer_sk, RF013[bloom] <- sr_item_sk, RF014[bloom] <- sr_ticket_number, RF015[min_max] <- sr_customer_sk, RF016[min_max] <- sr_item_sk, RF017[min_max] <- sr_ticket_number
-|  |  |  mem-estimate=369.59MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
+|  |  |  mem-estimate=887.02MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
 |  |  |
 |  |  19:EXCHANGE [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)]
 |  |  |  mem-estimate=13.28MB mem-reservation=0B thread-reservation=0
@@ -460,7 +460,7 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  |  |
 |  |  F03:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  |  Per-Host Shared Resources: mem-estimate=2.00MB mem-reservation=2.00MB thread-reservation=0 runtime-filters-memory=2.00MB
-|  |  Per-Instance Resources: mem-estimate=29.12MB mem-reservation=512.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=21.47MB mem-reservation=512.00KB thread-reservation=1
 |  |  max-parallelism=210 segment-costs=[2079102243]
 |  |  01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |  |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -481,7 +481,7 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=91 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=36.00MB mem-reservation=36.00MB thread-reservation=0 runtime-filters-memory=36.00MB
-|  Per-Instance Resources: mem-estimate=43.19MB mem-reservation=8.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=27.33MB mem-reservation=8.00MB thread-reservation=1
 |  max-parallelism=91 segment-costs=[2194601803]
 |  08:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=06
@@ -540,7 +540,7 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 Per-Host Shared Resources: mem-estimate=18.00MB mem-reservation=18.00MB thread-reservation=0 runtime-filters-memory=18.00MB
-Per-Instance Resources: mem-estimate=19.12MB mem-reservation=1.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=16.78MB mem-reservation=1.00MB thread-reservation=1
 max-parallelism=120 segment-costs=[1143954761]
 02:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_sales, RANDOM]
    HDFS partitions=1831/1831 files=1831 size=150.82MB
@@ -554,11 +554,11 @@ max-parallelism=120 segment-costs=[1143954761]
    tuple-ids=2 row-size=16B cardinality=644.12M(filtered from 4.32G) cost=148404942
    in pipelines: 02(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=1.77GB Threads=78
-Per-Host Resource Estimates: Memory=8.71GB
+Max Per-Host Resource Reservation: Memory=821.95MB Threads=58
+Per-Host Resource Estimates: Memory=7.04GB
 F11:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=4.22MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[1570] cpu-comparison-result=298 [max(1 (self) vs 298 (sum children))]
+|  max-parallelism=1 segment-costs=[1570] cpu-comparison-result=228 [max(1 (self) vs 228 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: i_item_id, i_item_desc, s_state, count(ss_quantity), avg(ss_quantity), stddev_samp(ss_quantity), stddev_samp(ss_quantity) / avg(ss_quantity), count(sr_return_quantity), avg(sr_return_quantity), stddev_samp(sr_return_quantity), stddev_samp(sr_return_quantity) / avg(sr_return_quantity), count(cs_quantity), avg(cs_quantity), stddev_samp(cs_quantity), stddev_samp(cs_quantity) / avg(cs_quantity)
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=1500
@@ -571,8 +571,8 @@ PLAN-ROOT SINK
 |  in pipelines: 16(GETNEXT)
 |
 F10:PLAN FRAGMENT [HASH(i_item_id,i_item_desc,s_state)] hosts=10 instances=10 (adjusted from 120)
-Per-Instance Resources: mem-estimate=157.29MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=10 segment-costs=[46282584, 77209102, 625] cpu-comparison-result=298 [max(10 (self) vs 298 (sum children))]
+Per-Instance Resources: mem-estimate=150.53MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=10 segment-costs=[46282584, 77209102, 625] cpu-comparison-result=228 [max(10 (self) vs 228 (sum children))]
 16:TOP-N [LIMIT=100]
 |  order by: i_item_id ASC, i_item_desc ASC, s_state ASC
 |  mem-estimate=22.13KB mem-reservation=0B thread-reservation=0
@@ -587,17 +587,17 @@ max-parallelism=10 segment-costs=[46282584, 77209102, 625] cpu-comparison-result
 |  in pipelines: 27(GETNEXT), 02(OPEN)
 |
 26:EXCHANGE [HASH(i_item_id,i_item_desc,s_state)]
-|  mem-estimate=19.01MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=12.25MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=8 row-size=227B cardinality=6.08M cost=7009532
 |  in pipelines: 02(GETNEXT)
 |
-F07:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=40 (adjusted from 120)
-Per-Instance Resources: mem-estimate=55.35MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298 [max(160 (self) vs 298 (sum children))]
+F07:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10 (adjusted from 120)
+Per-Instance Resources: mem-estimate=125.06MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=228 [max(130 (self) vs 228 (sum children))]
 15:AGGREGATE [STREAMING]
 |  output: count(ss_quantity), avg(CAST(ss_quantity AS BIGINT)), stddev_samp(ss_quantity), count(sr_return_quantity), avg(CAST(sr_return_quantity AS BIGINT)), stddev_samp(sr_return_quantity), count(cs_quantity), avg(CAST(cs_quantity AS BIGINT)), stddev_samp(cs_quantity)
 |  group by: i_item_id, i_item_desc, s_state
-|  mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=103.71MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=8 row-size=227B cardinality=6.08M cost=39273052
 |  in pipelines: 02(GETNEXT)
 |
@@ -610,13 +610,13 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  in pipelines: 02(GETNEXT), 06(OPEN)
 |
 |--F12:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=8.79MB mem-reservation=8.75MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=2.98MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[3140]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: s_store_sk
 |  |  runtime filters: RF000[bloom] <- s_store_sk, RF001[min_max] <- s_store_sk
-|  |  mem-estimate=7.75MB mem-reservation=7.75MB spill-buffer=64.00KB thread-reservation=0 cost=1350
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=1350
 |  |
 |  25:EXCHANGE [BROADCAST]
 |  |  mem-estimate=45.73KB mem-reservation=0B thread-reservation=0
@@ -645,13 +645,13 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  in pipelines: 02(GETNEXT), 05(OPEN)
 |
 |--F13:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=8.77MB mem-reservation=8.75MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[633]
 |  JOIN BUILD
 |  |  join-table-id=01 plan-id=02 cohort-id=01
 |  |  build expressions: d3.d_date_sk
 |  |  runtime filters: RF002[bloom] <- d3.d_date_sk
-|  |  mem-estimate=7.75MB mem-reservation=7.75MB spill-buffer=64.00KB thread-reservation=0 cost=273
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=273
 |  |
 |  24:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -682,22 +682,22 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  tuple-ids=2,0,3,1,4,7 row-size=257B cardinality=40.76M cost=172601792
 |  in pipelines: 02(GETNEXT), 00(OPEN)
 |
-|--F14:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=40 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=310.54MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
-|  |  max-parallelism=40 segment-costs=[96395086] cpu-comparison-result=276 [max(251 (self) vs 276 (sum children))]
+|--F14:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=1.03GB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
+|  |  max-parallelism=40 segment-costs=[96395086] cpu-comparison-result=206 [max(151 (self) vs 206 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=02 plan-id=03 cohort-id=01
 |  |  build expressions: sr_customer_sk, sr_item_sk
 |  |  runtime filters: RF004[bloom] <- sr_customer_sk, RF005[bloom] <- sr_item_sk, RF006[min_max] <- sr_customer_sk, RF007[min_max] <- sr_item_sk
-|  |  mem-estimate=253.00MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=40758026
+|  |  mem-estimate=1012.01MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=40758026
 |  |
 |  23:EXCHANGE [HASH(sr_customer_sk,sr_item_sk)]
-|  |  mem-estimate=40.54MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=22.72MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=0,3,1,4,7 row-size=241B cardinality=40.76M cost=55637060
 |  |  in pipelines: 00(GETNEXT)
 |  |
-|  F04:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  Per-Instance Resources: mem-estimate=55.87MB mem-reservation=0B thread-reservation=1
+|  F04:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=50 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=25.33MB mem-reservation=0B thread-reservation=1
 |  max-parallelism=120 segment-costs=[1166235430]
 |  11:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=03
@@ -708,13 +708,13 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  |  in pipelines: 00(GETNEXT), 07(OPEN)
 |  |
 |  |--F15:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=419.58MB mem-reservation=409.00MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=181.58MB mem-reservation=171.00MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[838440]
 |  |  JOIN BUILD
 |  |  |  join-table-id=03 plan-id=04 cohort-id=02
 |  |  |  build expressions: i_item_sk
 |  |  |  runtime filters: RF008[bloom] <- i_item_sk, RF009[min_max] <- i_item_sk
-|  |  |  mem-estimate=408.00MB mem-reservation=408.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
+|  |  |  mem-estimate=170.00MB mem-reservation=170.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
 |  |  |
 |  |  21:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.58MB mem-reservation=0B thread-reservation=0
@@ -743,13 +743,13 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  |  in pipelines: 00(GETNEXT), 04(OPEN)
 |  |
 |  |--F16:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=24.27MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=10.70MB mem-reservation=10.69MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[633]
 |  |  JOIN BUILD
 |  |  |  join-table-id=04 plan-id=05 cohort-id=02
 |  |  |  build expressions: d2.d_date_sk
 |  |  |  runtime filters: RF010[bloom] <- d2.d_date_sk
-|  |  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=273
+|  |  |  mem-estimate=9.69MB mem-reservation=9.69MB spill-buffer=64.00KB thread-reservation=0 cost=273
 |  |  |
 |  |  20:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -780,14 +780,14 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  |  tuple-ids=0,3,1 row-size=74B cardinality=299.34M cost=164804646
 |  |  in pipelines: 00(GETNEXT), 01(OPEN)
 |  |
-|  |--F17:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  |  |  Per-Instance Resources: mem-estimate=415.87MB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
+|  |--F17:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=50 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=933.30MB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
 |  |  |  max-parallelism=120 segment-costs=[1055362113]
 |  |  JOIN BUILD
 |  |  |  join-table-id=05 plan-id=06 cohort-id=02
 |  |  |  build expressions: sr_customer_sk, sr_item_sk, sr_ticket_number
 |  |  |  runtime filters: RF012[bloom] <- sr_customer_sk, RF013[bloom] <- sr_item_sk, RF014[bloom] <- sr_ticket_number, RF015[min_max] <- sr_customer_sk, RF016[min_max] <- sr_item_sk, RF017[min_max] <- sr_ticket_number
-|  |  |  mem-estimate=369.59MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
+|  |  |  mem-estimate=887.02MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
 |  |  |
 |  |  19:EXCHANGE [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)]
 |  |  |  mem-estimate=13.28MB mem-reservation=0B thread-reservation=0
@@ -796,7 +796,7 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  |  |
 |  |  F03:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  |  Per-Host Shared Resources: mem-estimate=2.00MB mem-reservation=2.00MB thread-reservation=0 runtime-filters-memory=2.00MB
-|  |  Per-Instance Resources: mem-estimate=29.12MB mem-reservation=512.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=21.47MB mem-reservation=512.00KB thread-reservation=1
 |  |  max-parallelism=210 segment-costs=[2079102243]
 |  |  01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |  |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -817,7 +817,7 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=91 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=36.00MB mem-reservation=36.00MB thread-reservation=0 runtime-filters-memory=36.00MB
-|  Per-Instance Resources: mem-estimate=43.19MB mem-reservation=8.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=27.33MB mem-reservation=8.00MB thread-reservation=1
 |  max-parallelism=91 segment-costs=[2194601803]
 |  08:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=06
@@ -876,7 +876,7 @@ max-parallelism=40 segment-costs=[345059032, 91812192] cpu-comparison-result=298
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 Per-Host Shared Resources: mem-estimate=18.00MB mem-reservation=18.00MB thread-reservation=0 runtime-filters-memory=18.00MB
-Per-Instance Resources: mem-estimate=19.12MB mem-reservation=1.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=16.78MB mem-reservation=1.00MB thread-reservation=1
 max-parallelism=120 segment-costs=[1143954761]
 02:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_sales, RANDOM]
    HDFS partitions=1831/1831 files=1831 size=150.82MB
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q18.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q18.test
index b9341bf3f..d7045f5cf 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q18.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q18.test
@@ -526,11 +526,11 @@ max-parallelism=90 segment-costs=[801276522, 554833998] cpu-comparison-result=10
    tuple-ids=0 row-size=36B cardinality=87.81M(filtered from 4.32G) cost=456222885
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=1.86GB Threads=47
-Per-Host Resource Estimates: Memory=4.23GB
+Max Per-Host Resource Reservation: Memory=1.46GB Threads=43
+Per-Host Resource Estimates: Memory=3.88GB
 F10:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=4.21MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[1146] cpu-comparison-result=230 [max(1 (self) vs 230 (sum children))]
+|  max-parallelism=1 segment-costs=[1146] cpu-comparison-result=210 [max(1 (self) vs 210 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: CASE valid_tid(16,8,10,12,14) WHEN 8 THEN i_item_id WHEN 10 THEN i_item_id WHEN 12 THEN i_item_id WHEN 14 THEN i_item_id WHEN 16 THEN NULL END, CASE valid_tid(16,8,10,12,14) WHEN 8 THEN ca_country WHEN 10 THEN ca_country WHEN 12 THEN ca_country WHEN 14 THEN NULL WHEN 16 THEN NULL END, CASE valid_tid(16,8,10,12,14) WHEN 8 THEN ca_state WHEN 10 THEN ca_state WHEN 12 THEN NULL WHEN 14 THEN NULL WHEN 16 THEN NULL END, CASE valid_tid(16,8,10,12,14) WHEN 8 THEN ca_county WHEN  [...]
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=1100
@@ -544,7 +544,7 @@ PLAN-ROOT SINK
 |
 F09:PLAN FRAGMENT [HASH(CASE valid_tid(7,9,11,13,15) WHEN 7 THEN murmur_hash(i_item_id) WHEN 9 THEN murmur_hash(i_item_id) WHEN 11 THEN murmur_hash(i_item_id) WHEN 13 THEN murmur_hash(i_item_id) WHEN 15 THEN murmur_hash(NULL) END,CASE valid_tid(7,9,11,13,15) WHEN 7 THEN murmur_hash(ca_country) WHEN 9 THEN murmur_hash(ca_country) WHEN 11 THEN murmur_hash(ca_country) WHEN 13 THEN murmur_hash(NULL) WHEN 15 THEN murmur_hash(NULL) END,CASE valid_tid(7,9,11,13,15) WHEN 7 THEN murmur_hash(ca_st [...]
 Per-Instance Resources: mem-estimate=484.76MB mem-reservation=120.94MB thread-reservation=1
-max-parallelism=20 segment-costs=[120556755, 79992706, 168290698, 303] cpu-comparison-result=230 [max(20 (self) vs 230 (sum children))]
+max-parallelism=20 segment-costs=[120556755, 79992706, 168290698, 303] cpu-comparison-result=210 [max(20 (self) vs 210 (sum children))]
 15:TOP-N [LIMIT=100]
 |  order by: CASE valid_tid(16,8,10,12,14) WHEN 8 THEN ca_country WHEN 10 THEN ca_country WHEN 12 THEN ca_country WHEN 14 THEN NULL WHEN 16 THEN NULL END ASC, CASE valid_tid(16,8,10,12,14) WHEN 8 THEN ca_state WHEN 10 THEN ca_state WHEN 12 THEN NULL WHEN 14 THEN NULL WHEN 16 THEN NULL END ASC, CASE valid_tid(16,8,10,12,14) WHEN 8 THEN ca_county WHEN 10 THEN NULL WHEN 12 THEN NULL WHEN 14 THEN NULL WHEN 16 THEN NULL END ASC, CASE valid_tid(16,8,10,12,14) WHEN 8 THEN i_item_id WHEN 10 THEN [...]
 |  mem-estimate=10.16KB mem-reservation=0B thread-reservation=0
@@ -579,13 +579,13 @@ max-parallelism=20 segment-costs=[120556755, 79992706, 168290698, 303] cpu-compa
 |  in pipelines: 25(GETNEXT), 00(OPEN)
 |
 24:EXCHANGE [HASH(CASE valid_tid(7,9,11,13,15) WHEN 7 THEN murmur_hash(i_item_id) WHEN 9 THEN murmur_hash(i_item_id) WHEN 11 THEN murmur_hash(i_item_id) WHEN 13 THEN murmur_hash(i_item_id) WHEN 15 THEN murmur_hash(NULL) END,CASE valid_tid(7,9,11,13,15) WHEN 7 THEN murmur_hash(ca_country) WHEN 9 THEN murmur_hash(ca_country) WHEN 11 THEN murmur_hash(ca_country) WHEN 13 THEN murmur_hash(NULL) WHEN 15 THEN murmur_hash(NULL) END,CASE valid_tid(7,9,11,13,15) WHEN 7 THEN murmur_hash(ca_state) W [...]
-|  mem-estimate=48.73MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=35.82MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=7N,9N,11N,13N,15N row-size=641B cardinality=12.65M cost=40571033
 |  in pipelines: 00(GETNEXT)
 |
-F06:PLAN FRAGMENT [HASH(c_current_addr_sk)] hosts=10 instances=60 (adjusted from 120)
-Per-Instance Resources: mem-estimate=268.81MB mem-reservation=138.00MB thread-reservation=1
-max-parallelism=60 segment-costs=[204847925, 554833998] cpu-comparison-result=230 [max(230 (self) vs 195 (sum children))]
+F06:PLAN FRAGMENT [HASH(c_current_addr_sk)] hosts=10 instances=40 (adjusted from 120)
+Per-Instance Resources: mem-estimate=364.40MB mem-reservation=138.00MB thread-reservation=1
+max-parallelism=60 segment-costs=[204847925, 554833998] cpu-comparison-result=210 [max(210 (self) vs 175 (sum children))]
 13:AGGREGATE [STREAMING]
 |  Class 0
 |    output: avg(CAST(cs_quantity AS DECIMAL(12,2))), avg(CAST(cs_list_price AS DECIMAL(12,2))), avg(CAST(cs_coupon_amt AS DECIMAL(12,2))), avg(CAST(cs_sales_price AS DECIMAL(12,2))), avg(CAST(cs_net_profit AS DECIMAL(12,2))), avg(CAST(c_birth_year AS DECIMAL(12,2))), avg(CAST(cd1.cd_dep_count AS DECIMAL(12,2)))
@@ -602,7 +602,7 @@ max-parallelism=60 segment-costs=[204847925, 554833998] cpu-comparison-result=23
 |  Class 4
 |    output: avg(CAST(cs_quantity AS DECIMAL(12,2))), avg(CAST(cs_list_price AS DECIMAL(12,2))), avg(CAST(cs_coupon_amt AS DECIMAL(12,2))), avg(CAST(cs_sales_price AS DECIMAL(12,2))), avg(CAST(cs_net_profit AS DECIMAL(12,2))), avg(CAST(c_birth_year AS DECIMAL(12,2))), avg(CAST(cd1.cd_dep_count AS DECIMAL(12,2)))
 |    group by: NULL, NULL, NULL, NULL
-|  mem-estimate=201.19MB mem-reservation=138.00MB thread-reservation=0
+|  mem-estimate=296.78MB mem-reservation=138.00MB thread-reservation=0
 |  tuple-ids=7N,9N,11N,13N,15N row-size=641B cardinality=12.65M cost=159300508
 |  in pipelines: 00(GETNEXT)
 |
@@ -615,13 +615,13 @@ max-parallelism=60 segment-costs=[204847925, 554833998] cpu-comparison-result=23
 |  in pipelines: 00(GETNEXT), 06(OPEN)
 |
 |--F11:PLAN FRAGMENT [HASH(c_current_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=215.14MB mem-reservation=205.00MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=147.14MB mem-reservation=137.00MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[838440]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: i_item_sk
 |  |  runtime filters: RF000[bloom] <- i_item_sk, RF001[min_max] <- i_item_sk
-|  |  mem-estimate=204.00MB mem-reservation=204.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
+|  |  mem-estimate=136.00MB mem-reservation=136.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
 |  |
 |  23:EXCHANGE [BROADCAST]
 |  |  mem-estimate=10.14MB mem-reservation=0B thread-reservation=0
@@ -650,13 +650,13 @@ max-parallelism=60 segment-costs=[204847925, 554833998] cpu-comparison-result=23
 |  in pipelines: 00(GETNEXT), 02(OPEN)
 |
 |--F12:PLAN FRAGMENT [HASH(c_current_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=212.41MB mem-reservation=205.00MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=144.41MB mem-reservation=137.00MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[4473540]
 |  JOIN BUILD
 |  |  join-table-id=01 plan-id=02 cohort-id=01
 |  |  build expressions: cd2.cd_demo_sk
 |  |  runtime filters: RF002[bloom] <- cd2.cd_demo_sk, RF003[min_max] <- cd2.cd_demo_sk
-|  |  mem-estimate=204.00MB mem-reservation=204.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
+|  |  mem-estimate=136.00MB mem-reservation=136.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
 |  |
 |  22:EXCHANGE [BROADCAST]
 |  |  mem-estimate=7.41MB mem-reservation=0B thread-reservation=0
@@ -680,18 +680,18 @@ max-parallelism=60 segment-costs=[204847925, 554833998] cpu-comparison-result=23
 |  hash-table-id=02
 |  hash predicates: c_current_addr_sk = ca_address_sk
 |  fk/pk conjuncts: c_current_addr_sk = ca_address_sk
-|  mem-estimate=0B mem-reservation=0B spill-buffer=256.00KB thread-reservation=0
+|  mem-estimate=0B mem-reservation=0B spill-buffer=512.00KB thread-reservation=0
 |  tuple-ids=0,1,5,3,4 row-size=176B cardinality=6.22M cost=11464967
 |  in pipelines: 00(GETNEXT), 04(OPEN)
 |
-|--F13:PLAN FRAGMENT [HASH(c_current_addr_sk)] hosts=10 instances=60 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=16.46MB mem-reservation=5.75MB thread-reservation=1 runtime-filters-memory=1.00MB
+|--F13:PLAN FRAGMENT [HASH(c_current_addr_sk)] hosts=10 instances=40 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=20.21MB mem-reservation=9.50MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=60 segment-costs=[2940664]
 |  JOIN BUILD
 |  |  join-table-id=02 plan-id=03 cohort-id=01
 |  |  build expressions: ca_address_sk
 |  |  runtime filters: RF004[bloom] <- ca_address_sk, RF005[min_max] <- ca_address_sk
-|  |  mem-estimate=4.75MB mem-reservation=4.75MB spill-buffer=256.00KB thread-reservation=0 cost=2058824
+|  |  mem-estimate=8.50MB mem-reservation=8.50MB spill-buffer=512.00KB thread-reservation=0 cost=2058824
 |  |
 |  21:EXCHANGE [HASH(ca_address_sk)]
 |  |  mem-estimate=10.71MB mem-reservation=0B thread-reservation=0
@@ -699,7 +699,7 @@ max-parallelism=60 segment-costs=[204847925, 554833998] cpu-comparison-result=23
 |  |  in pipelines: 04(GETNEXT)
 |  |
 |  F05:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
-|  Per-Instance Resources: mem-estimate=33.10MB mem-reservation=128.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=27.40MB mem-reservation=128.00KB thread-reservation=1
 |  max-parallelism=10 segment-costs=[17745335]
 |  04:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |     HDFS partitions=1/1 files=1 size=1.16MB
@@ -720,7 +720,7 @@ max-parallelism=60 segment-costs=[204847925, 554833998] cpu-comparison-result=23
 |  in pipelines: 00(GETNEXT)
 |
 F04:PLAN FRAGMENT [HASH(cs_bill_customer_sk)] hosts=10 instances=50 (adjusted from 120)
-Per-Instance Resources: mem-estimate=50.28MB mem-reservation=0B thread-reservation=1
+Per-Instance Resources: mem-estimate=40.70MB mem-reservation=0B thread-reservation=1
 max-parallelism=50 segment-costs=[440687026]
 09:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=03
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q22.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q22.test
index 9e9f33778..4eaefa855 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q22.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q22.test
@@ -111,10 +111,10 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=12B cardinality=1.03G(filtered from 1.03G) cost=178599168
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=3.70GB Threads=29
-Per-Host Resource Estimates: Memory=81.31GB
+Max Per-Host Resource Reservation: Memory=3.29GB Threads=26
+Per-Host Resource Estimates: Memory=75.27GB
 F04:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Instance Resources: mem-estimate=4.69MB mem-reservation=4.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=4.52MB mem-reservation=4.00MB thread-reservation=1
 |  max-parallelism=1 segment-costs=[536] cpu-comparison-result=120 [max(1 (self) vs 120 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: CASE valid_tid(4,6,8,10,12) WHEN 4 THEN i_product_name WHEN 6 THEN i_product_name WHEN 8 THEN i_product_name WHEN 10 THEN i_product_name WHEN 12 THEN NULL END, CASE valid_tid(4,6,8,10,12) WHEN 4 THEN i_brand WHEN 6 THEN i_brand WHEN 8 THEN i_brand WHEN 10 THEN NULL WHEN 12 THEN NULL END, CASE valid_tid(4,6,8,10,12) WHEN 4 THEN i_class WHEN 6 THEN i_class WHEN 8 THEN NULL WHEN 10 THEN NULL WHEN 12 THEN NULL END, CASE valid_tid(4,6,8,10,12) WHEN 4 THEN i_category WHEN 6 TH [...]
@@ -123,13 +123,13 @@ PLAN-ROOT SINK
 12:MERGING-EXCHANGE [UNPARTITIONED]
 |  order by: aggif(valid_tid(4,6,8,10,12) IN (4, 6, 8, 10, 12), CASE valid_tid(4,6,8,10,12) WHEN 4 THEN avg(inv_quantity_on_hand) WHEN 6 THEN avg(inv_quantity_on_hand) WHEN 8 THEN avg(inv_quantity_on_hand) WHEN 10 THEN avg(inv_quantity_on_hand) WHEN 12 THEN avg(inv_quantity_on_hand) END) ASC, CASE valid_tid(4,6,8,10,12) WHEN 4 THEN i_product_name WHEN 6 THEN i_product_name WHEN 8 THEN i_product_name WHEN 10 THEN i_product_name WHEN 12 THEN NULL END ASC, CASE valid_tid(4,6,8,10,12) WHEN 4 [...]
 |  limit: 100
-|  mem-estimate=703.67KB mem-reservation=0B thread-reservation=0
+|  mem-estimate=527.89KB mem-reservation=0B thread-reservation=0
 |  tuple-ids=14 row-size=56B cardinality=100 cost=36
 |  in pipelines: 07(GETNEXT)
 |
-F03:PLAN FRAGMENT [HASH(CASE valid_tid(3,5,7,9,11) WHEN 3 THEN murmur_hash(i_product_name) WHEN 5 THEN murmur_hash(i_product_name) WHEN 7 THEN murmur_hash(i_product_name) WHEN 9 THEN murmur_hash(i_product_name) WHEN 11 THEN murmur_hash(NULL) END,CASE valid_tid(3,5,7,9,11) WHEN 3 THEN murmur_hash(i_brand) WHEN 5 THEN murmur_hash(i_brand) WHEN 7 THEN murmur_hash(i_brand) WHEN 9 THEN murmur_hash(NULL) WHEN 11 THEN murmur_hash(NULL) END,CASE valid_tid(3,5,7,9,11) WHEN 3 THEN murmur_hash(i_cl [...]
-Per-Instance Resources: mem-estimate=2.90GB mem-reservation=140.81MB thread-reservation=1
-max-parallelism=4070 segment-costs=[18964265177, 13665740596, 40606342913, 178] cpu-comparison-result=120 [max(120 (self) vs 120 (sum children))]
+F03:PLAN FRAGMENT [HASH(CASE valid_tid(3,5,7,9,11) WHEN 3 THEN murmur_hash(i_product_name) WHEN 5 THEN murmur_hash(i_product_name) WHEN 7 THEN murmur_hash(i_product_name) WHEN 9 THEN murmur_hash(i_product_name) WHEN 11 THEN murmur_hash(NULL) END,CASE valid_tid(3,5,7,9,11) WHEN 3 THEN murmur_hash(i_brand) WHEN 5 THEN murmur_hash(i_brand) WHEN 7 THEN murmur_hash(i_brand) WHEN 9 THEN murmur_hash(NULL) WHEN 11 THEN murmur_hash(NULL) END,CASE valid_tid(3,5,7,9,11) WHEN 3 THEN murmur_hash(i_cl [...]
+Per-Instance Resources: mem-estimate=3.27GB mem-reservation=140.81MB thread-reservation=1
+max-parallelism=4070 segment-costs=[18964265177, 13665740596, 40606342913, 178] cpu-comparison-result=120 [max(90 (self) vs 120 (sum children))]
 07:TOP-N [LIMIT=100]
 |  order by: aggif(valid_tid(4,6,8,10,12) IN (4, 6, 8, 10, 12), CASE valid_tid(4,6,8,10,12) WHEN 4 THEN avg(inv_quantity_on_hand) WHEN 6 THEN avg(inv_quantity_on_hand) WHEN 8 THEN avg(inv_quantity_on_hand) WHEN 10 THEN avg(inv_quantity_on_hand) WHEN 12 THEN avg(inv_quantity_on_hand) END) ASC, CASE valid_tid(4,6,8,10,12) WHEN 4 THEN i_product_name WHEN 6 THEN i_product_name WHEN 8 THEN i_product_name WHEN 10 THEN i_product_name WHEN 12 THEN NULL END ASC, CASE valid_tid(4,6,8,10,12) WHEN 4 [...]
 |  mem-estimate=5.47KB mem-reservation=0B thread-reservation=0
@@ -139,7 +139,7 @@ max-parallelism=4070 segment-costs=[18964265177, 13665740596, 40606342913, 178]
 06:AGGREGATE [FINALIZE]
 |  output: aggif(valid_tid(4,6,8,10,12) IN (CAST(4 AS INT), CAST(6 AS INT), CAST(8 AS INT), CAST(10 AS INT), CAST(12 AS INT)), CASE valid_tid(4,6,8,10,12) WHEN CAST(4 AS INT) THEN avg(inv_quantity_on_hand) WHEN CAST(6 AS INT) THEN avg(inv_quantity_on_hand) WHEN CAST(8 AS INT) THEN avg(inv_quantity_on_hand) WHEN CAST(10 AS INT) THEN avg(inv_quantity_on_hand) WHEN CAST(12 AS INT) THEN avg(inv_quantity_on_hand) END)
 |  group by: CASE valid_tid(4,6,8,10,12) WHEN CAST(4 AS INT) THEN i_product_name WHEN CAST(6 AS INT) THEN i_product_name WHEN CAST(8 AS INT) THEN i_product_name WHEN CAST(10 AS INT) THEN i_product_name WHEN CAST(12 AS INT) THEN NULL END, CASE valid_tid(4,6,8,10,12) WHEN CAST(4 AS INT) THEN i_brand WHEN CAST(6 AS INT) THEN i_brand WHEN CAST(8 AS INT) THEN i_brand WHEN CAST(10 AS INT) THEN NULL WHEN CAST(12 AS INT) THEN NULL END, CASE valid_tid(4,6,8,10,12) WHEN CAST(4 AS INT) THEN i_class [...]
-|  mem-estimate=562.80MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=590.40MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=13 row-size=60B cardinality=2.32G cost=13665740596
 |  in pipelines: 06(GETNEXT), 11(OPEN)
 |
@@ -159,7 +159,7 @@ max-parallelism=4070 segment-costs=[18964265177, 13665740596, 40606342913, 178]
 |  Class 4
 |    output: avg:merge(inv_quantity_on_hand)
 |    group by: NULL, NULL, NULL, NULL
-|  mem-estimate=2.35GB mem-reservation=106.81MB thread-reservation=0
+|  mem-estimate=2.69GB mem-reservation=106.81MB thread-reservation=0
 |  tuple-ids=4N,6N,8N,10N,12N row-size=441B cardinality=2.32G cost=13665733530
 |  in pipelines: 11(GETNEXT), 00(OPEN)
 |
@@ -170,7 +170,7 @@ max-parallelism=4070 segment-costs=[18964265177, 13665740596, 40606342913, 178]
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 Per-Host Shared Resources: mem-estimate=2.00MB mem-reservation=2.00MB thread-reservation=0 runtime-filters-memory=2.00MB
-Per-Instance Resources: mem-estimate=3.84GB mem-reservation=138.25MB thread-reservation=1
+Per-Instance Resources: mem-estimate=3.78GB mem-reservation=138.25MB thread-reservation=1
 max-parallelism=261 segment-costs=[22410494033, 71771164792] cpu-comparison-result=120 [max(120 (self) vs 25 (sum children))]
 05:AGGREGATE [STREAMING]
 |  Class 0
@@ -277,10 +277,10 @@ max-parallelism=261 segment-costs=[22410494033, 71771164792] cpu-comparison-resu
    tuple-ids=0 row-size=12B cardinality=1.03G(filtered from 1.03G) cost=178599168
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=3.70GB Threads=29
-Per-Host Resource Estimates: Memory=81.31GB
+Max Per-Host Resource Reservation: Memory=3.29GB Threads=26
+Per-Host Resource Estimates: Memory=75.27GB
 F04:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Instance Resources: mem-estimate=4.69MB mem-reservation=4.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=4.52MB mem-reservation=4.00MB thread-reservation=1
 |  max-parallelism=1 segment-costs=[536] cpu-comparison-result=120 [max(1 (self) vs 120 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: CASE valid_tid(4,6,8,10,12) WHEN 4 THEN i_product_name WHEN 6 THEN i_product_name WHEN 8 THEN i_product_name WHEN 10 THEN i_product_name WHEN 12 THEN NULL END, CASE valid_tid(4,6,8,10,12) WHEN 4 THEN i_brand WHEN 6 THEN i_brand WHEN 8 THEN i_brand WHEN 10 THEN NULL WHEN 12 THEN NULL END, CASE valid_tid(4,6,8,10,12) WHEN 4 THEN i_class WHEN 6 THEN i_class WHEN 8 THEN NULL WHEN 10 THEN NULL WHEN 12 THEN NULL END, CASE valid_tid(4,6,8,10,12) WHEN 4 THEN i_category WHEN 6 TH [...]
@@ -289,13 +289,13 @@ PLAN-ROOT SINK
 12:MERGING-EXCHANGE [UNPARTITIONED]
 |  order by: aggif(valid_tid(4,6,8,10,12) IN (4, 6, 8, 10, 12), CASE valid_tid(4,6,8,10,12) WHEN 4 THEN avg(inv_quantity_on_hand) WHEN 6 THEN avg(inv_quantity_on_hand) WHEN 8 THEN avg(inv_quantity_on_hand) WHEN 10 THEN avg(inv_quantity_on_hand) WHEN 12 THEN avg(inv_quantity_on_hand) END) ASC, CASE valid_tid(4,6,8,10,12) WHEN 4 THEN i_product_name WHEN 6 THEN i_product_name WHEN 8 THEN i_product_name WHEN 10 THEN i_product_name WHEN 12 THEN NULL END ASC, CASE valid_tid(4,6,8,10,12) WHEN 4 [...]
 |  limit: 100
-|  mem-estimate=703.67KB mem-reservation=0B thread-reservation=0
+|  mem-estimate=527.89KB mem-reservation=0B thread-reservation=0
 |  tuple-ids=14 row-size=56B cardinality=100 cost=36
 |  in pipelines: 07(GETNEXT)
 |
-F03:PLAN FRAGMENT [HASH(CASE valid_tid(3,5,7,9,11) WHEN 3 THEN murmur_hash(i_product_name) WHEN 5 THEN murmur_hash(i_product_name) WHEN 7 THEN murmur_hash(i_product_name) WHEN 9 THEN murmur_hash(i_product_name) WHEN 11 THEN murmur_hash(NULL) END,CASE valid_tid(3,5,7,9,11) WHEN 3 THEN murmur_hash(i_brand) WHEN 5 THEN murmur_hash(i_brand) WHEN 7 THEN murmur_hash(i_brand) WHEN 9 THEN murmur_hash(NULL) WHEN 11 THEN murmur_hash(NULL) END,CASE valid_tid(3,5,7,9,11) WHEN 3 THEN murmur_hash(i_cl [...]
-Per-Instance Resources: mem-estimate=2.90GB mem-reservation=140.81MB thread-reservation=1
-max-parallelism=4070 segment-costs=[18964265177, 13665740596, 40606342913, 178] cpu-comparison-result=120 [max(120 (self) vs 120 (sum children))]
+F03:PLAN FRAGMENT [HASH(CASE valid_tid(3,5,7,9,11) WHEN 3 THEN murmur_hash(i_product_name) WHEN 5 THEN murmur_hash(i_product_name) WHEN 7 THEN murmur_hash(i_product_name) WHEN 9 THEN murmur_hash(i_product_name) WHEN 11 THEN murmur_hash(NULL) END,CASE valid_tid(3,5,7,9,11) WHEN 3 THEN murmur_hash(i_brand) WHEN 5 THEN murmur_hash(i_brand) WHEN 7 THEN murmur_hash(i_brand) WHEN 9 THEN murmur_hash(NULL) WHEN 11 THEN murmur_hash(NULL) END,CASE valid_tid(3,5,7,9,11) WHEN 3 THEN murmur_hash(i_cl [...]
+Per-Instance Resources: mem-estimate=3.27GB mem-reservation=140.81MB thread-reservation=1
+max-parallelism=4070 segment-costs=[18964265177, 13665740596, 40606342913, 178] cpu-comparison-result=120 [max(90 (self) vs 120 (sum children))]
 07:TOP-N [LIMIT=100]
 |  order by: aggif(valid_tid(4,6,8,10,12) IN (4, 6, 8, 10, 12), CASE valid_tid(4,6,8,10,12) WHEN 4 THEN avg(inv_quantity_on_hand) WHEN 6 THEN avg(inv_quantity_on_hand) WHEN 8 THEN avg(inv_quantity_on_hand) WHEN 10 THEN avg(inv_quantity_on_hand) WHEN 12 THEN avg(inv_quantity_on_hand) END) ASC, CASE valid_tid(4,6,8,10,12) WHEN 4 THEN i_product_name WHEN 6 THEN i_product_name WHEN 8 THEN i_product_name WHEN 10 THEN i_product_name WHEN 12 THEN NULL END ASC, CASE valid_tid(4,6,8,10,12) WHEN 4 [...]
 |  mem-estimate=5.47KB mem-reservation=0B thread-reservation=0
@@ -305,7 +305,7 @@ max-parallelism=4070 segment-costs=[18964265177, 13665740596, 40606342913, 178]
 06:AGGREGATE [FINALIZE]
 |  output: aggif(valid_tid(4,6,8,10,12) IN (CAST(4 AS INT), CAST(6 AS INT), CAST(8 AS INT), CAST(10 AS INT), CAST(12 AS INT)), CASE valid_tid(4,6,8,10,12) WHEN CAST(4 AS INT) THEN avg(inv_quantity_on_hand) WHEN CAST(6 AS INT) THEN avg(inv_quantity_on_hand) WHEN CAST(8 AS INT) THEN avg(inv_quantity_on_hand) WHEN CAST(10 AS INT) THEN avg(inv_quantity_on_hand) WHEN CAST(12 AS INT) THEN avg(inv_quantity_on_hand) END)
 |  group by: CASE valid_tid(4,6,8,10,12) WHEN CAST(4 AS INT) THEN i_product_name WHEN CAST(6 AS INT) THEN i_product_name WHEN CAST(8 AS INT) THEN i_product_name WHEN CAST(10 AS INT) THEN i_product_name WHEN CAST(12 AS INT) THEN NULL END, CASE valid_tid(4,6,8,10,12) WHEN CAST(4 AS INT) THEN i_brand WHEN CAST(6 AS INT) THEN i_brand WHEN CAST(8 AS INT) THEN i_brand WHEN CAST(10 AS INT) THEN NULL WHEN CAST(12 AS INT) THEN NULL END, CASE valid_tid(4,6,8,10,12) WHEN CAST(4 AS INT) THEN i_class [...]
-|  mem-estimate=562.80MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=590.40MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=13 row-size=60B cardinality=2.32G cost=13665740596
 |  in pipelines: 06(GETNEXT), 11(OPEN)
 |
@@ -325,7 +325,7 @@ max-parallelism=4070 segment-costs=[18964265177, 13665740596, 40606342913, 178]
 |  Class 4
 |    output: avg:merge(inv_quantity_on_hand)
 |    group by: NULL, NULL, NULL, NULL
-|  mem-estimate=2.35GB mem-reservation=106.81MB thread-reservation=0
+|  mem-estimate=2.69GB mem-reservation=106.81MB thread-reservation=0
 |  tuple-ids=4N,6N,8N,10N,12N row-size=441B cardinality=2.32G cost=13665733530
 |  in pipelines: 11(GETNEXT), 00(OPEN)
 |
@@ -336,7 +336,7 @@ max-parallelism=4070 segment-costs=[18964265177, 13665740596, 40606342913, 178]
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 Per-Host Shared Resources: mem-estimate=2.00MB mem-reservation=2.00MB thread-reservation=0 runtime-filters-memory=2.00MB
-Per-Instance Resources: mem-estimate=3.84GB mem-reservation=138.25MB thread-reservation=1
+Per-Instance Resources: mem-estimate=3.78GB mem-reservation=138.25MB thread-reservation=1
 max-parallelism=261 segment-costs=[22410494033, 71771164792] cpu-comparison-result=120 [max(120 (self) vs 25 (sum children))]
 05:AGGREGATE [STREAMING]
 |  Class 0
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q24a.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q24a.test
index bfab2edf3..84086472f 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q24a.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q24a.test
@@ -324,11 +324,11 @@ PLAN-ROOT SINK
    tuple-ids=1 row-size=12B cardinality=33.37M(filtered from 863.99M) cost=149297235
    in pipelines: 01(GETNEXT)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=3.42GB Threads=107
-Per-Host Resource Estimates: Memory=24.74GB
+Max Per-Host Resource Reservation: Memory=2.79GB Threads=94
+Per-Host Resource Estimates: Memory=20.17GB
 F20:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=178.20MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[52516691] cpu-comparison-result=515 [max(1 (self) vs 515 (sum children))]
+|  max-parallelism=1 segment-costs=[52516691] cpu-comparison-result=475 [max(1 (self) vs 475 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: $c$1, $c$2, $c$3, $c$4
 |  mem-estimate=100.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=47865236
@@ -341,7 +341,7 @@ PLAN-ROOT SINK
 |
 F10:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name)] hosts=10 instances=10 (adjusted from 120)
 Per-Instance Resources: mem-estimate=168.68MB mem-reservation=46.00MB thread-reservation=1
-max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-result=515 [max(10 (self) vs 515 (sum children))]
+max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-result=475 [max(10 (self) vs 475 (sum children))]
 27:SORT
 |  order by: $c$1 ASC, $c$2 ASC, $c$3 ASC
 |  mem-estimate=77.49MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
@@ -357,7 +357,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |
 |--F21:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name)] hosts=10 instances=10
 |  |  Per-Instance Resources: mem-estimate=16.02KB mem-reservation=0B thread-reservation=1
-|  |  max-parallelism=10 segment-costs=[0] cpu-comparison-result=305 [max(10 (self) vs 305 (sum children))]
+|  |  max-parallelism=10 segment-costs=[0] cpu-comparison-result=285 [max(10 (self) vs 285 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  mem-estimate=16B mem-reservation=0B thread-reservation=0 cost=0
@@ -369,7 +369,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |
 |  F19:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=96.00KB mem-reservation=0B thread-reservation=1
-|  max-parallelism=1 segment-costs=[0, 0] cpu-comparison-result=305 [max(1 (self) vs 305 (sum children))]
+|  max-parallelism=1 segment-costs=[0, 0] cpu-comparison-result=285 [max(1 (self) vs 285 (sum children))]
 |  49:AGGREGATE [FINALIZE]
 |  |  output: avg:merge(netpaid)
 |  |  mem-estimate=16.00KB mem-reservation=0B spill-buffer=2.00MB thread-reservation=0
@@ -381,9 +381,9 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  tuple-ids=18 row-size=16B cardinality=1 cost=0
 |  |  in pipelines: 25(GETNEXT)
 |  |
-|  F18:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)] hosts=10 instances=120
-|  Per-Instance Resources: mem-estimate=542.33MB mem-reservation=34.00MB thread-reservation=1
-|  max-parallelism=750 segment-costs=[7418435974, 77261318, 1] cpu-comparison-result=305 [max(120 (self) vs 305 (sum children))]
+|  F18:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)] hosts=10 instances=70 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=541.28MB mem-reservation=34.00MB thread-reservation=1
+|  max-parallelism=750 segment-costs=[7418435974, 77261318, 1] cpu-comparison-result=285 [max(70 (self) vs 285 (sum children))]
 |  25:AGGREGATE
 |  |  output: avg(sum(ss_net_paid))
 |  |  mem-estimate=16.00KB mem-reservation=0B spill-buffer=2.00MB thread-reservation=0
@@ -393,22 +393,22 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  47:AGGREGATE [FINALIZE]
 |  |  output: sum:merge(ss_net_paid)
 |  |  group by: c_last_name, c_first_name, s_store_name, ca_state, s_state, i_color, i_current_price, i_manager_id, i_units, i_size
-|  |  mem-estimate=513.84MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  |  mem-estimate=515.87MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  |  tuple-ids=16 row-size=154B cardinality=1.10G cost=6514895149
 |  |  in pipelines: 47(GETNEXT), 13(OPEN)
 |  |
 |  46:EXCHANGE [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)]
-|  |  mem-estimate=28.49MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=25.41MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=16 row-size=154B cardinality=1.10G cost=903540825
 |  |  in pipelines: 13(GETNEXT)
 |  |
-|  F14:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  Per-Instance Resources: mem-estimate=607.29MB mem-reservation=34.00MB thread-reservation=1
-|  max-parallelism=1160 segment-costs=[9537419439, 11501468359] cpu-comparison-result=305 [max(240 (self) vs 305 (sum children))]
+|  F14:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=100 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=576.90MB mem-reservation=34.00MB thread-reservation=1
+|  max-parallelism=1160 segment-costs=[9537419439, 11501468359] cpu-comparison-result=285 [max(220 (self) vs 285 (sum children))]
 |  24:AGGREGATE [STREAMING]
 |  |  output: sum(ss_net_paid)
 |  |  group by: c_last_name, c_first_name, s_store_name, ca_state, s_state, i_color, i_current_price, i_manager_id, i_units, i_size
-|  |  mem-estimate=513.13MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  |  mem-estimate=513.56MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  |  tuple-ids=16 row-size=154B cardinality=1.10G cost=6514895149
 |  |  in pipelines: 13(GETNEXT)
 |  |
@@ -422,13 +422,13 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  in pipelines: 13(GETNEXT), 18(OPEN)
 |  |
 |  |--F22:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=1.22GB mem-reservation=408.00MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=1.22GB mem-reservation=340.00MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[34934990]
 |  |  JOIN BUILD
 |  |  |  join-table-id=01 plan-id=02 cohort-id=02
 |  |  |  build expressions: ca_address_sk, ca_zip
 |  |  |  runtime filters: RF016[min_max] <- ca_address_sk, RF017[min_max] <- ca_zip
-|  |  |  mem-estimate=1.21GB mem-reservation=408.00MB spill-buffer=2.00MB thread-reservation=0 cost=15000000
+|  |  |  mem-estimate=1.21GB mem-reservation=340.00MB spill-buffer=2.00MB thread-reservation=0 cost=15000000
 |  |  |
 |  |  45:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.62MB mem-reservation=0B thread-reservation=0
@@ -457,13 +457,13 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  in pipelines: 13(GETNEXT), 16(OPEN)
 |  |
 |  |--F23:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=419.26MB mem-reservation=409.00MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=351.26MB mem-reservation=341.00MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[838440]
 |  |  JOIN BUILD
 |  |  |  join-table-id=02 plan-id=03 cohort-id=02
 |  |  |  build expressions: i_item_sk
 |  |  |  runtime filters: RF018[bloom] <- i_item_sk, RF019[min_max] <- i_item_sk
-|  |  |  mem-estimate=408.00MB mem-reservation=408.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
+|  |  |  mem-estimate=340.00MB mem-reservation=340.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
 |  |  |
 |  |  44:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.26MB mem-reservation=0B thread-reservation=0
@@ -492,13 +492,13 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  in pipelines: 13(GETNEXT), 17(OPEN)
 |  |
 |  |--F24:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=2.58GB mem-reservation=424.00MB thread-reservation=1 runtime-filters-memory=16.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.58GB mem-reservation=356.00MB thread-reservation=1 runtime-filters-memory=16.00MB
 |  |  |  max-parallelism=10 segment-costs=[69869990]
 |  |  JOIN BUILD
 |  |  |  join-table-id=03 plan-id=04 cohort-id=02
 |  |  |  build expressions: c_customer_sk
 |  |  |  runtime filters: RF020[bloom] <- c_customer_sk, RF021[min_max] <- c_customer_sk
-|  |  |  mem-estimate=2.56GB mem-reservation=408.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
+|  |  |  mem-estimate=2.56GB mem-reservation=340.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
 |  |  |
 |  |  43:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.67MB mem-reservation=0B thread-reservation=0
@@ -527,14 +527,14 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  tuple-ids=10,12,11 row-size=91B cardinality=1.20G cost=662301194
 |  |  in pipelines: 13(GETNEXT), 14(OPEN)
 |  |
-|  |--F25:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  |  |  Per-Instance Resources: mem-estimate=316.07MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
+|  |--F25:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=100 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=373.51MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
 |  |  |  max-parallelism=1160 segment-costs=[1007669941]
 |  |  JOIN BUILD
 |  |  |  join-table-id=04 plan-id=05 cohort-id=02
 |  |  |  build expressions: sr_item_sk, sr_ticket_number
 |  |  |  runtime filters: RF022[bloom] <- sr_item_sk, RF023[bloom] <- sr_ticket_number, RF024[min_max] <- sr_item_sk, RF025[min_max] <- sr_ticket_number
-|  |  |  mem-estimate=287.20MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
+|  |  |  mem-estimate=344.64MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
 |  |  |
 |  |  42:EXCHANGE [HASH(sr_item_sk,sr_ticket_number)]
 |  |  |  mem-estimate=11.88MB mem-reservation=0B thread-reservation=0
@@ -543,7 +543,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  |
 |  |  F13:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  |  Per-Instance Resources: mem-estimate=23.50MB mem-reservation=512.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=22.25MB mem-reservation=512.00KB thread-reservation=1
 |  |  max-parallelism=130 segment-costs=[1262114593]
 |  |  14:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |  |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -564,7 +564,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |
 |  F11:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=35.00MB mem-reservation=35.00MB thread-reservation=0 runtime-filters-memory=35.00MB
-|  Per-Instance Resources: mem-estimate=56.75MB mem-reservation=8.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=49.96MB mem-reservation=8.00MB thread-reservation=1
 |  max-parallelism=1440 segment-costs=[14345766064]
 |  19:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=05
@@ -631,7 +631,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |
 F09:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)] hosts=10 instances=10 (adjusted from 120)
 Per-Instance Resources: mem-estimate=270.69MB mem-reservation=68.00MB thread-reservation=1
-max-parallelism=10 segment-costs=[80428225, 70632335, 58495720] cpu-comparison-result=210 [max(10 (self) vs 210 (sum children))]
+max-parallelism=10 segment-costs=[80428225, 70632335, 58495720] cpu-comparison-result=190 [max(10 (self) vs 190 (sum children))]
 12:AGGREGATE [STREAMING]
 |  output: sum(sum(ss_net_paid))
 |  group by: c_last_name, c_first_name, s_store_name
@@ -652,8 +652,8 @@ max-parallelism=10 segment-costs=[80428225, 70632335, 58495720] cpu-comparison-r
 |  in pipelines: 01(GETNEXT)
 |
 F08:PLAN FRAGMENT [HASH(c_current_addr_sk,s_zip)] hosts=10 instances=20 (adjusted from 120)
-Per-Instance Resources: mem-estimate=94.08MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=20 segment-costs=[90934267, 124695110] cpu-comparison-result=210 [max(90 (self) vs 210 (sum children))]
+Per-Instance Resources: mem-estimate=91.76MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=20 segment-costs=[90934267, 124695110] cpu-comparison-result=190 [max(70 (self) vs 190 (sum children))]
 11:AGGREGATE [STREAMING]
 |  output: sum(ss_net_paid)
 |  group by: c_last_name, c_first_name, s_store_name, ca_state, s_state, i_color, i_current_price, i_manager_id, i_units, i_size
@@ -698,12 +698,12 @@ max-parallelism=20 segment-costs=[90934267, 124695110] cpu-comparison-result=210
 |     in pipelines: 05(GETNEXT)
 |
 34:EXCHANGE [HASH(c_current_addr_sk,s_zip)]
-|  mem-estimate=16.96MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=14.64MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=1,0,3,2,4 row-size=218B cardinality=11.97M cost=15064279
 |  in pipelines: 01(GETNEXT)
 |
-F06:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
-Per-Instance Resources: mem-estimate=31.85MB mem-reservation=0B thread-reservation=1
+F06:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=20 (adjusted from 120)
+Per-Instance Resources: mem-estimate=30.21MB mem-reservation=0B thread-reservation=1
 max-parallelism=30 segment-costs=[216016822]
 09:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=07
@@ -713,14 +713,14 @@ max-parallelism=30 segment-costs=[216016822]
 |  tuple-ids=1,0,3,2,4 row-size=218B cardinality=11.97M cost=5511921
 |  in pipelines: 01(GETNEXT), 04(OPEN)
 |
-|--F28:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=113.95MB mem-reservation=50.00MB thread-reservation=1 runtime-filters-memory=16.00MB
+|--F28:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=20 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=157.59MB mem-reservation=50.00MB thread-reservation=1 runtime-filters-memory=16.00MB
 |  |  max-parallelism=30 segment-costs=[42258566]
 |  JOIN BUILD
 |  |  join-table-id=07 plan-id=08 cohort-id=01
 |  |  build expressions: c_customer_sk
 |  |  runtime filters: RF004[bloom] <- c_customer_sk, RF005[min_max] <- c_customer_sk
-|  |  mem-estimate=87.28MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
+|  |  mem-estimate=130.92MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
 |  |
 |  33:EXCHANGE [HASH(c_customer_sk)]
 |  |  mem-estimate=10.67MB mem-reservation=0B thread-reservation=0
@@ -728,7 +728,7 @@ max-parallelism=30 segment-costs=[216016822]
 |  |  in pipelines: 04(GETNEXT)
 |  |
 |  F05:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
-|  Per-Instance Resources: mem-estimate=24.05MB mem-reservation=1.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=21.37MB mem-reservation=1.00MB thread-reservation=1
 |  max-parallelism=10 segment-costs=[152802831]
 |  04:SCAN HDFS [tpcds_partitioned_parquet_snap.customer, RANDOM]
 |     HDFS partitions=1/1 files=1 size=5.49MB
@@ -742,12 +742,12 @@ max-parallelism=30 segment-costs=[216016822]
 |     in pipelines: 04(GETNEXT)
 |
 32:EXCHANGE [HASH(ss_customer_sk)]
-|  mem-estimate=13.30MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=11.65MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=1,0,3,2 row-size=153B cardinality=13.04M cost=12052336
 |  in pipelines: 01(GETNEXT)
 |
-F04:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
-Per-Instance Resources: mem-estimate=30.10MB mem-reservation=0B thread-reservation=1
+F04:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+Per-Instance Resources: mem-estimate=23.50MB mem-reservation=0B thread-reservation=1
 max-parallelism=20 segment-costs=[171645227]
 08:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=08
@@ -757,14 +757,14 @@ max-parallelism=20 segment-costs=[171645227]
 |  tuple-ids=1,0,3,2 row-size=153B cardinality=13.04M cost=10922206
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
-|--F29:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=182.18MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
-|  |  max-parallelism=20 segment-costs=[34399586] cpu-comparison-result=140 [max(140 (self) vs 25 (sum children))]
+|--F29:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=327.44MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
+|  |  max-parallelism=20 segment-costs=[34399586] cpu-comparison-result=130 [max(130 (self) vs 25 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=08 plan-id=09 cohort-id=01
 |  |  build expressions: ss_item_sk, ss_ticket_number
 |  |  runtime filters: RF006[bloom] <- ss_item_sk, RF007[bloom] <- ss_ticket_number, RF008[min_max] <- ss_item_sk, RF009[min_max] <- ss_ticket_number
-|  |  mem-estimate=145.26MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=18771203
+|  |  mem-estimate=290.53MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=18771203
 |  |
 |  31:EXCHANGE [HASH(ss_item_sk,ss_ticket_number)]
 |  |  mem-estimate=27.91MB mem-reservation=0B thread-reservation=0
@@ -773,7 +773,7 @@ max-parallelism=20 segment-costs=[171645227]
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=18.00MB mem-reservation=18.00MB thread-reservation=0 runtime-filters-memory=18.00MB
-|  Per-Instance Resources: mem-estimate=27.94MB mem-reservation=8.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=21.97MB mem-reservation=8.00MB thread-reservation=1
 |  max-parallelism=330 segment-costs=[3253628617]
 |  07:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=09
@@ -871,7 +871,7 @@ max-parallelism=20 segment-costs=[171645227]
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=20 (adjusted from 120)
 Per-Host Shared Resources: mem-estimate=9.00MB mem-reservation=9.00MB thread-reservation=0 runtime-filters-memory=9.00MB
-Per-Instance Resources: mem-estimate=17.25MB mem-reservation=512.00KB thread-reservation=1
+Per-Instance Resources: mem-estimate=16.62MB mem-reservation=512.00KB thread-reservation=1
 max-parallelism=20 segment-costs=[192281583]
 01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
    HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -885,11 +885,11 @@ max-parallelism=20 segment-costs=[192281583]
    tuple-ids=1 row-size=12B cardinality=33.37M(filtered from 863.99M) cost=149297235
    in pipelines: 01(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=3.42GB Threads=107
-Per-Host Resource Estimates: Memory=24.74GB
+Max Per-Host Resource Reservation: Memory=2.79GB Threads=94
+Per-Host Resource Estimates: Memory=20.17GB
 F20:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=178.20MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[52516691] cpu-comparison-result=515 [max(1 (self) vs 515 (sum children))]
+|  max-parallelism=1 segment-costs=[52516691] cpu-comparison-result=475 [max(1 (self) vs 475 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: $c$1, $c$2, $c$3, $c$4
 |  mem-estimate=100.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=47865236
@@ -902,7 +902,7 @@ PLAN-ROOT SINK
 |
 F10:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name)] hosts=10 instances=10 (adjusted from 120)
 Per-Instance Resources: mem-estimate=168.68MB mem-reservation=46.00MB thread-reservation=1
-max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-result=515 [max(10 (self) vs 515 (sum children))]
+max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-result=475 [max(10 (self) vs 475 (sum children))]
 27:SORT
 |  order by: $c$1 ASC, $c$2 ASC, $c$3 ASC
 |  mem-estimate=77.49MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
@@ -918,7 +918,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |
 |--F21:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name)] hosts=10 instances=10
 |  |  Per-Instance Resources: mem-estimate=16.02KB mem-reservation=0B thread-reservation=1
-|  |  max-parallelism=10 segment-costs=[0] cpu-comparison-result=305 [max(10 (self) vs 305 (sum children))]
+|  |  max-parallelism=10 segment-costs=[0] cpu-comparison-result=285 [max(10 (self) vs 285 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  mem-estimate=16B mem-reservation=0B thread-reservation=0 cost=0
@@ -930,7 +930,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |
 |  F19:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=96.00KB mem-reservation=0B thread-reservation=1
-|  max-parallelism=1 segment-costs=[0, 0] cpu-comparison-result=305 [max(1 (self) vs 305 (sum children))]
+|  max-parallelism=1 segment-costs=[0, 0] cpu-comparison-result=285 [max(1 (self) vs 285 (sum children))]
 |  49:AGGREGATE [FINALIZE]
 |  |  output: avg:merge(netpaid)
 |  |  mem-estimate=16.00KB mem-reservation=0B spill-buffer=2.00MB thread-reservation=0
@@ -942,9 +942,9 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  tuple-ids=18 row-size=16B cardinality=1 cost=0
 |  |  in pipelines: 25(GETNEXT)
 |  |
-|  F18:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)] hosts=10 instances=120
-|  Per-Instance Resources: mem-estimate=542.33MB mem-reservation=34.00MB thread-reservation=1
-|  max-parallelism=750 segment-costs=[7418435974, 77261318, 1] cpu-comparison-result=305 [max(120 (self) vs 305 (sum children))]
+|  F18:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)] hosts=10 instances=70 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=541.28MB mem-reservation=34.00MB thread-reservation=1
+|  max-parallelism=750 segment-costs=[7418435974, 77261318, 1] cpu-comparison-result=285 [max(70 (self) vs 285 (sum children))]
 |  25:AGGREGATE
 |  |  output: avg(sum(ss_net_paid))
 |  |  mem-estimate=16.00KB mem-reservation=0B spill-buffer=2.00MB thread-reservation=0
@@ -954,22 +954,22 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  47:AGGREGATE [FINALIZE]
 |  |  output: sum:merge(ss_net_paid)
 |  |  group by: c_last_name, c_first_name, s_store_name, ca_state, s_state, i_color, i_current_price, i_manager_id, i_units, i_size
-|  |  mem-estimate=513.84MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  |  mem-estimate=515.87MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  |  tuple-ids=16 row-size=154B cardinality=1.10G cost=6514895149
 |  |  in pipelines: 47(GETNEXT), 13(OPEN)
 |  |
 |  46:EXCHANGE [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)]
-|  |  mem-estimate=28.49MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=25.41MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=16 row-size=154B cardinality=1.10G cost=903540825
 |  |  in pipelines: 13(GETNEXT)
 |  |
-|  F14:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  Per-Instance Resources: mem-estimate=607.29MB mem-reservation=34.00MB thread-reservation=1
-|  max-parallelism=1160 segment-costs=[9537419439, 11501468359] cpu-comparison-result=305 [max(240 (self) vs 305 (sum children))]
+|  F14:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=100 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=576.90MB mem-reservation=34.00MB thread-reservation=1
+|  max-parallelism=1160 segment-costs=[9537419439, 11501468359] cpu-comparison-result=285 [max(220 (self) vs 285 (sum children))]
 |  24:AGGREGATE [STREAMING]
 |  |  output: sum(ss_net_paid)
 |  |  group by: c_last_name, c_first_name, s_store_name, ca_state, s_state, i_color, i_current_price, i_manager_id, i_units, i_size
-|  |  mem-estimate=513.13MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  |  mem-estimate=513.56MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  |  tuple-ids=16 row-size=154B cardinality=1.10G cost=6514895149
 |  |  in pipelines: 13(GETNEXT)
 |  |
@@ -983,13 +983,13 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  in pipelines: 13(GETNEXT), 18(OPEN)
 |  |
 |  |--F22:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=1.22GB mem-reservation=408.00MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=1.22GB mem-reservation=340.00MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[34934990]
 |  |  JOIN BUILD
 |  |  |  join-table-id=01 plan-id=02 cohort-id=02
 |  |  |  build expressions: ca_address_sk, ca_zip
 |  |  |  runtime filters: RF016[min_max] <- ca_address_sk, RF017[min_max] <- ca_zip
-|  |  |  mem-estimate=1.21GB mem-reservation=408.00MB spill-buffer=2.00MB thread-reservation=0 cost=15000000
+|  |  |  mem-estimate=1.21GB mem-reservation=340.00MB spill-buffer=2.00MB thread-reservation=0 cost=15000000
 |  |  |
 |  |  45:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.62MB mem-reservation=0B thread-reservation=0
@@ -1018,13 +1018,13 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  in pipelines: 13(GETNEXT), 16(OPEN)
 |  |
 |  |--F23:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=419.26MB mem-reservation=409.00MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=351.26MB mem-reservation=341.00MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[838440]
 |  |  JOIN BUILD
 |  |  |  join-table-id=02 plan-id=03 cohort-id=02
 |  |  |  build expressions: i_item_sk
 |  |  |  runtime filters: RF018[bloom] <- i_item_sk, RF019[min_max] <- i_item_sk
-|  |  |  mem-estimate=408.00MB mem-reservation=408.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
+|  |  |  mem-estimate=340.00MB mem-reservation=340.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
 |  |  |
 |  |  44:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.26MB mem-reservation=0B thread-reservation=0
@@ -1053,13 +1053,13 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  in pipelines: 13(GETNEXT), 17(OPEN)
 |  |
 |  |--F24:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=2.58GB mem-reservation=424.00MB thread-reservation=1 runtime-filters-memory=16.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.58GB mem-reservation=356.00MB thread-reservation=1 runtime-filters-memory=16.00MB
 |  |  |  max-parallelism=10 segment-costs=[69869990]
 |  |  JOIN BUILD
 |  |  |  join-table-id=03 plan-id=04 cohort-id=02
 |  |  |  build expressions: c_customer_sk
 |  |  |  runtime filters: RF020[bloom] <- c_customer_sk, RF021[min_max] <- c_customer_sk
-|  |  |  mem-estimate=2.56GB mem-reservation=408.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
+|  |  |  mem-estimate=2.56GB mem-reservation=340.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
 |  |  |
 |  |  43:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.67MB mem-reservation=0B thread-reservation=0
@@ -1088,14 +1088,14 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  tuple-ids=10,12,11 row-size=91B cardinality=1.20G cost=662301194
 |  |  in pipelines: 13(GETNEXT), 14(OPEN)
 |  |
-|  |--F25:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  |  |  Per-Instance Resources: mem-estimate=316.07MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
+|  |--F25:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=100 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=373.51MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
 |  |  |  max-parallelism=1160 segment-costs=[1007669941]
 |  |  JOIN BUILD
 |  |  |  join-table-id=04 plan-id=05 cohort-id=02
 |  |  |  build expressions: sr_item_sk, sr_ticket_number
 |  |  |  runtime filters: RF022[bloom] <- sr_item_sk, RF023[bloom] <- sr_ticket_number, RF024[min_max] <- sr_item_sk, RF025[min_max] <- sr_ticket_number
-|  |  |  mem-estimate=287.20MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
+|  |  |  mem-estimate=344.64MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
 |  |  |
 |  |  42:EXCHANGE [HASH(sr_item_sk,sr_ticket_number)]
 |  |  |  mem-estimate=11.88MB mem-reservation=0B thread-reservation=0
@@ -1104,7 +1104,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  |
 |  |  F13:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  |  Per-Instance Resources: mem-estimate=23.50MB mem-reservation=512.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=22.25MB mem-reservation=512.00KB thread-reservation=1
 |  |  max-parallelism=130 segment-costs=[1262114593]
 |  |  14:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |  |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -1125,7 +1125,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |
 |  F11:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=35.00MB mem-reservation=35.00MB thread-reservation=0 runtime-filters-memory=35.00MB
-|  Per-Instance Resources: mem-estimate=56.75MB mem-reservation=8.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=49.96MB mem-reservation=8.00MB thread-reservation=1
 |  max-parallelism=1440 segment-costs=[14345766064]
 |  19:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=05
@@ -1192,7 +1192,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |
 F09:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)] hosts=10 instances=10 (adjusted from 120)
 Per-Instance Resources: mem-estimate=270.69MB mem-reservation=68.00MB thread-reservation=1
-max-parallelism=10 segment-costs=[80428225, 70632335, 58495720] cpu-comparison-result=210 [max(10 (self) vs 210 (sum children))]
+max-parallelism=10 segment-costs=[80428225, 70632335, 58495720] cpu-comparison-result=190 [max(10 (self) vs 190 (sum children))]
 12:AGGREGATE [STREAMING]
 |  output: sum(sum(ss_net_paid))
 |  group by: c_last_name, c_first_name, s_store_name
@@ -1213,8 +1213,8 @@ max-parallelism=10 segment-costs=[80428225, 70632335, 58495720] cpu-comparison-r
 |  in pipelines: 01(GETNEXT)
 |
 F08:PLAN FRAGMENT [HASH(c_current_addr_sk,s_zip)] hosts=10 instances=20 (adjusted from 120)
-Per-Instance Resources: mem-estimate=94.08MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=20 segment-costs=[90934267, 124695110] cpu-comparison-result=210 [max(90 (self) vs 210 (sum children))]
+Per-Instance Resources: mem-estimate=91.76MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=20 segment-costs=[90934267, 124695110] cpu-comparison-result=190 [max(70 (self) vs 190 (sum children))]
 11:AGGREGATE [STREAMING]
 |  output: sum(ss_net_paid)
 |  group by: c_last_name, c_first_name, s_store_name, ca_state, s_state, i_color, i_current_price, i_manager_id, i_units, i_size
@@ -1259,12 +1259,12 @@ max-parallelism=20 segment-costs=[90934267, 124695110] cpu-comparison-result=210
 |     in pipelines: 05(GETNEXT)
 |
 34:EXCHANGE [HASH(c_current_addr_sk,s_zip)]
-|  mem-estimate=16.96MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=14.64MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=1,0,3,2,4 row-size=218B cardinality=11.97M cost=15064279
 |  in pipelines: 01(GETNEXT)
 |
-F06:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
-Per-Instance Resources: mem-estimate=31.85MB mem-reservation=0B thread-reservation=1
+F06:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=20 (adjusted from 120)
+Per-Instance Resources: mem-estimate=30.21MB mem-reservation=0B thread-reservation=1
 max-parallelism=30 segment-costs=[216016822]
 09:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=07
@@ -1274,14 +1274,14 @@ max-parallelism=30 segment-costs=[216016822]
 |  tuple-ids=1,0,3,2,4 row-size=218B cardinality=11.97M cost=5511921
 |  in pipelines: 01(GETNEXT), 04(OPEN)
 |
-|--F28:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=113.95MB mem-reservation=50.00MB thread-reservation=1 runtime-filters-memory=16.00MB
+|--F28:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=20 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=157.59MB mem-reservation=50.00MB thread-reservation=1 runtime-filters-memory=16.00MB
 |  |  max-parallelism=30 segment-costs=[42258566]
 |  JOIN BUILD
 |  |  join-table-id=07 plan-id=08 cohort-id=01
 |  |  build expressions: c_customer_sk
 |  |  runtime filters: RF004[bloom] <- c_customer_sk, RF005[min_max] <- c_customer_sk
-|  |  mem-estimate=87.28MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
+|  |  mem-estimate=130.92MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
 |  |
 |  33:EXCHANGE [HASH(c_customer_sk)]
 |  |  mem-estimate=10.67MB mem-reservation=0B thread-reservation=0
@@ -1289,7 +1289,7 @@ max-parallelism=30 segment-costs=[216016822]
 |  |  in pipelines: 04(GETNEXT)
 |  |
 |  F05:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
-|  Per-Instance Resources: mem-estimate=24.05MB mem-reservation=1.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=21.37MB mem-reservation=1.00MB thread-reservation=1
 |  max-parallelism=10 segment-costs=[152802831]
 |  04:SCAN HDFS [tpcds_partitioned_parquet_snap.customer, RANDOM]
 |     HDFS partitions=1/1 files=1 size=5.49MB
@@ -1303,12 +1303,12 @@ max-parallelism=30 segment-costs=[216016822]
 |     in pipelines: 04(GETNEXT)
 |
 32:EXCHANGE [HASH(ss_customer_sk)]
-|  mem-estimate=13.30MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=11.65MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=1,0,3,2 row-size=153B cardinality=13.04M cost=12052336
 |  in pipelines: 01(GETNEXT)
 |
-F04:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
-Per-Instance Resources: mem-estimate=30.10MB mem-reservation=0B thread-reservation=1
+F04:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+Per-Instance Resources: mem-estimate=23.50MB mem-reservation=0B thread-reservation=1
 max-parallelism=20 segment-costs=[171645227]
 08:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=08
@@ -1318,14 +1318,14 @@ max-parallelism=20 segment-costs=[171645227]
 |  tuple-ids=1,0,3,2 row-size=153B cardinality=13.04M cost=10922206
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
-|--F29:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=182.18MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
-|  |  max-parallelism=20 segment-costs=[34399586] cpu-comparison-result=140 [max(140 (self) vs 25 (sum children))]
+|--F29:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=327.44MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
+|  |  max-parallelism=20 segment-costs=[34399586] cpu-comparison-result=130 [max(130 (self) vs 25 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=08 plan-id=09 cohort-id=01
 |  |  build expressions: ss_item_sk, ss_ticket_number
 |  |  runtime filters: RF006[bloom] <- ss_item_sk, RF007[bloom] <- ss_ticket_number, RF008[min_max] <- ss_item_sk, RF009[min_max] <- ss_ticket_number
-|  |  mem-estimate=145.26MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=18771203
+|  |  mem-estimate=290.53MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=18771203
 |  |
 |  31:EXCHANGE [HASH(ss_item_sk,ss_ticket_number)]
 |  |  mem-estimate=27.91MB mem-reservation=0B thread-reservation=0
@@ -1334,7 +1334,7 @@ max-parallelism=20 segment-costs=[171645227]
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=18.00MB mem-reservation=18.00MB thread-reservation=0 runtime-filters-memory=18.00MB
-|  Per-Instance Resources: mem-estimate=27.94MB mem-reservation=8.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=21.97MB mem-reservation=8.00MB thread-reservation=1
 |  max-parallelism=330 segment-costs=[3253628617]
 |  07:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=09
@@ -1432,7 +1432,7 @@ max-parallelism=20 segment-costs=[171645227]
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=20 (adjusted from 120)
 Per-Host Shared Resources: mem-estimate=9.00MB mem-reservation=9.00MB thread-reservation=0 runtime-filters-memory=9.00MB
-Per-Instance Resources: mem-estimate=17.25MB mem-reservation=512.00KB thread-reservation=1
+Per-Instance Resources: mem-estimate=16.62MB mem-reservation=512.00KB thread-reservation=1
 max-parallelism=20 segment-costs=[192281583]
 01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
    HDFS partitions=2004/2004 files=2004 size=33.63MB
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q24b.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q24b.test
index 60da16087..84f412235 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q24b.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q24b.test
@@ -325,11 +325,11 @@ PLAN-ROOT SINK
    tuple-ids=1 row-size=12B cardinality=33.37M(filtered from 863.99M) cost=149297235
    in pipelines: 01(GETNEXT)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=3.42GB Threads=107
-Per-Host Resource Estimates: Memory=24.74GB
+Max Per-Host Resource Reservation: Memory=2.79GB Threads=94
+Per-Host Resource Estimates: Memory=20.17GB
 F20:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=178.20MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[52516691] cpu-comparison-result=515 [max(1 (self) vs 515 (sum children))]
+|  max-parallelism=1 segment-costs=[52516691] cpu-comparison-result=475 [max(1 (self) vs 475 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: $c$1, $c$2, $c$3, $c$4
 |  mem-estimate=100.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=47865236
@@ -342,7 +342,7 @@ PLAN-ROOT SINK
 |
 F10:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name)] hosts=10 instances=10 (adjusted from 120)
 Per-Instance Resources: mem-estimate=168.68MB mem-reservation=46.00MB thread-reservation=1
-max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-result=515 [max(10 (self) vs 515 (sum children))]
+max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-result=475 [max(10 (self) vs 475 (sum children))]
 27:SORT
 |  order by: $c$1 ASC, $c$2 ASC, $c$3 ASC
 |  mem-estimate=77.49MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
@@ -358,7 +358,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |
 |--F21:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name)] hosts=10 instances=10
 |  |  Per-Instance Resources: mem-estimate=16.02KB mem-reservation=0B thread-reservation=1
-|  |  max-parallelism=10 segment-costs=[0] cpu-comparison-result=305 [max(10 (self) vs 305 (sum children))]
+|  |  max-parallelism=10 segment-costs=[0] cpu-comparison-result=285 [max(10 (self) vs 285 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  mem-estimate=16B mem-reservation=0B thread-reservation=0 cost=0
@@ -370,7 +370,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |
 |  F19:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=96.00KB mem-reservation=0B thread-reservation=1
-|  max-parallelism=1 segment-costs=[0, 0] cpu-comparison-result=305 [max(1 (self) vs 305 (sum children))]
+|  max-parallelism=1 segment-costs=[0, 0] cpu-comparison-result=285 [max(1 (self) vs 285 (sum children))]
 |  49:AGGREGATE [FINALIZE]
 |  |  output: avg:merge(netpaid)
 |  |  mem-estimate=16.00KB mem-reservation=0B spill-buffer=2.00MB thread-reservation=0
@@ -382,9 +382,9 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  tuple-ids=18 row-size=16B cardinality=1 cost=0
 |  |  in pipelines: 25(GETNEXT)
 |  |
-|  F18:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)] hosts=10 instances=120
-|  Per-Instance Resources: mem-estimate=542.33MB mem-reservation=34.00MB thread-reservation=1
-|  max-parallelism=750 segment-costs=[7418435974, 77261318, 1] cpu-comparison-result=305 [max(120 (self) vs 305 (sum children))]
+|  F18:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)] hosts=10 instances=70 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=541.28MB mem-reservation=34.00MB thread-reservation=1
+|  max-parallelism=750 segment-costs=[7418435974, 77261318, 1] cpu-comparison-result=285 [max(70 (self) vs 285 (sum children))]
 |  25:AGGREGATE
 |  |  output: avg(sum(ss_net_paid))
 |  |  mem-estimate=16.00KB mem-reservation=0B spill-buffer=2.00MB thread-reservation=0
@@ -394,22 +394,22 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  47:AGGREGATE [FINALIZE]
 |  |  output: sum:merge(ss_net_paid)
 |  |  group by: c_last_name, c_first_name, s_store_name, ca_state, s_state, i_color, i_current_price, i_manager_id, i_units, i_size
-|  |  mem-estimate=513.84MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  |  mem-estimate=515.87MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  |  tuple-ids=16 row-size=154B cardinality=1.10G cost=6514895149
 |  |  in pipelines: 47(GETNEXT), 13(OPEN)
 |  |
 |  46:EXCHANGE [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)]
-|  |  mem-estimate=28.49MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=25.41MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=16 row-size=154B cardinality=1.10G cost=903540825
 |  |  in pipelines: 13(GETNEXT)
 |  |
-|  F14:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  Per-Instance Resources: mem-estimate=607.29MB mem-reservation=34.00MB thread-reservation=1
-|  max-parallelism=1160 segment-costs=[9537419439, 11501468359] cpu-comparison-result=305 [max(240 (self) vs 305 (sum children))]
+|  F14:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=100 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=576.90MB mem-reservation=34.00MB thread-reservation=1
+|  max-parallelism=1160 segment-costs=[9537419439, 11501468359] cpu-comparison-result=285 [max(220 (self) vs 285 (sum children))]
 |  24:AGGREGATE [STREAMING]
 |  |  output: sum(ss_net_paid)
 |  |  group by: c_last_name, c_first_name, s_store_name, ca_state, s_state, i_color, i_current_price, i_manager_id, i_units, i_size
-|  |  mem-estimate=513.13MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  |  mem-estimate=513.56MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  |  tuple-ids=16 row-size=154B cardinality=1.10G cost=6514895149
 |  |  in pipelines: 13(GETNEXT)
 |  |
@@ -423,13 +423,13 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  in pipelines: 13(GETNEXT), 18(OPEN)
 |  |
 |  |--F22:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=1.22GB mem-reservation=408.00MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=1.22GB mem-reservation=340.00MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[34934990]
 |  |  JOIN BUILD
 |  |  |  join-table-id=01 plan-id=02 cohort-id=02
 |  |  |  build expressions: ca_address_sk, ca_zip
 |  |  |  runtime filters: RF016[min_max] <- ca_address_sk, RF017[min_max] <- ca_zip
-|  |  |  mem-estimate=1.21GB mem-reservation=408.00MB spill-buffer=2.00MB thread-reservation=0 cost=15000000
+|  |  |  mem-estimate=1.21GB mem-reservation=340.00MB spill-buffer=2.00MB thread-reservation=0 cost=15000000
 |  |  |
 |  |  45:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.62MB mem-reservation=0B thread-reservation=0
@@ -458,13 +458,13 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  in pipelines: 13(GETNEXT), 16(OPEN)
 |  |
 |  |--F23:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=419.26MB mem-reservation=409.00MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=351.26MB mem-reservation=341.00MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[838440]
 |  |  JOIN BUILD
 |  |  |  join-table-id=02 plan-id=03 cohort-id=02
 |  |  |  build expressions: i_item_sk
 |  |  |  runtime filters: RF018[bloom] <- i_item_sk, RF019[min_max] <- i_item_sk
-|  |  |  mem-estimate=408.00MB mem-reservation=408.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
+|  |  |  mem-estimate=340.00MB mem-reservation=340.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
 |  |  |
 |  |  44:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.26MB mem-reservation=0B thread-reservation=0
@@ -493,13 +493,13 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  in pipelines: 13(GETNEXT), 17(OPEN)
 |  |
 |  |--F24:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=2.58GB mem-reservation=424.00MB thread-reservation=1 runtime-filters-memory=16.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.58GB mem-reservation=356.00MB thread-reservation=1 runtime-filters-memory=16.00MB
 |  |  |  max-parallelism=10 segment-costs=[69869990]
 |  |  JOIN BUILD
 |  |  |  join-table-id=03 plan-id=04 cohort-id=02
 |  |  |  build expressions: c_customer_sk
 |  |  |  runtime filters: RF020[bloom] <- c_customer_sk, RF021[min_max] <- c_customer_sk
-|  |  |  mem-estimate=2.56GB mem-reservation=408.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
+|  |  |  mem-estimate=2.56GB mem-reservation=340.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
 |  |  |
 |  |  43:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.67MB mem-reservation=0B thread-reservation=0
@@ -528,14 +528,14 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  tuple-ids=10,12,11 row-size=91B cardinality=1.20G cost=662301194
 |  |  in pipelines: 13(GETNEXT), 14(OPEN)
 |  |
-|  |--F25:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  |  |  Per-Instance Resources: mem-estimate=316.07MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
+|  |--F25:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=100 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=373.51MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
 |  |  |  max-parallelism=1160 segment-costs=[1007669941]
 |  |  JOIN BUILD
 |  |  |  join-table-id=04 plan-id=05 cohort-id=02
 |  |  |  build expressions: sr_item_sk, sr_ticket_number
 |  |  |  runtime filters: RF022[bloom] <- sr_item_sk, RF023[bloom] <- sr_ticket_number, RF024[min_max] <- sr_item_sk, RF025[min_max] <- sr_ticket_number
-|  |  |  mem-estimate=287.20MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
+|  |  |  mem-estimate=344.64MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
 |  |  |
 |  |  42:EXCHANGE [HASH(sr_item_sk,sr_ticket_number)]
 |  |  |  mem-estimate=11.88MB mem-reservation=0B thread-reservation=0
@@ -544,7 +544,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  |
 |  |  F13:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  |  Per-Instance Resources: mem-estimate=23.50MB mem-reservation=512.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=22.25MB mem-reservation=512.00KB thread-reservation=1
 |  |  max-parallelism=130 segment-costs=[1262114593]
 |  |  14:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |  |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -565,7 +565,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |
 |  F11:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=35.00MB mem-reservation=35.00MB thread-reservation=0 runtime-filters-memory=35.00MB
-|  Per-Instance Resources: mem-estimate=56.75MB mem-reservation=8.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=49.96MB mem-reservation=8.00MB thread-reservation=1
 |  max-parallelism=1440 segment-costs=[14345766064]
 |  19:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=05
@@ -632,7 +632,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |
 F09:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)] hosts=10 instances=10 (adjusted from 120)
 Per-Instance Resources: mem-estimate=270.69MB mem-reservation=68.00MB thread-reservation=1
-max-parallelism=10 segment-costs=[80428225, 70632335, 58495720] cpu-comparison-result=210 [max(10 (self) vs 210 (sum children))]
+max-parallelism=10 segment-costs=[80428225, 70632335, 58495720] cpu-comparison-result=190 [max(10 (self) vs 190 (sum children))]
 12:AGGREGATE [STREAMING]
 |  output: sum(sum(ss_net_paid))
 |  group by: c_last_name, c_first_name, s_store_name
@@ -653,8 +653,8 @@ max-parallelism=10 segment-costs=[80428225, 70632335, 58495720] cpu-comparison-r
 |  in pipelines: 01(GETNEXT)
 |
 F08:PLAN FRAGMENT [HASH(c_current_addr_sk,s_zip)] hosts=10 instances=20 (adjusted from 120)
-Per-Instance Resources: mem-estimate=94.08MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=20 segment-costs=[90934267, 124695110] cpu-comparison-result=210 [max(90 (self) vs 210 (sum children))]
+Per-Instance Resources: mem-estimate=91.76MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=20 segment-costs=[90934267, 124695110] cpu-comparison-result=190 [max(70 (self) vs 190 (sum children))]
 11:AGGREGATE [STREAMING]
 |  output: sum(ss_net_paid)
 |  group by: c_last_name, c_first_name, s_store_name, ca_state, s_state, i_color, i_current_price, i_manager_id, i_units, i_size
@@ -699,12 +699,12 @@ max-parallelism=20 segment-costs=[90934267, 124695110] cpu-comparison-result=210
 |     in pipelines: 05(GETNEXT)
 |
 34:EXCHANGE [HASH(c_current_addr_sk,s_zip)]
-|  mem-estimate=16.96MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=14.64MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=1,0,3,2,4 row-size=218B cardinality=11.97M cost=15064279
 |  in pipelines: 01(GETNEXT)
 |
-F06:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
-Per-Instance Resources: mem-estimate=31.85MB mem-reservation=0B thread-reservation=1
+F06:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=20 (adjusted from 120)
+Per-Instance Resources: mem-estimate=30.21MB mem-reservation=0B thread-reservation=1
 max-parallelism=30 segment-costs=[216016822]
 09:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=07
@@ -714,14 +714,14 @@ max-parallelism=30 segment-costs=[216016822]
 |  tuple-ids=1,0,3,2,4 row-size=218B cardinality=11.97M cost=5511921
 |  in pipelines: 01(GETNEXT), 04(OPEN)
 |
-|--F28:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=113.95MB mem-reservation=50.00MB thread-reservation=1 runtime-filters-memory=16.00MB
+|--F28:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=20 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=157.59MB mem-reservation=50.00MB thread-reservation=1 runtime-filters-memory=16.00MB
 |  |  max-parallelism=30 segment-costs=[42258566]
 |  JOIN BUILD
 |  |  join-table-id=07 plan-id=08 cohort-id=01
 |  |  build expressions: c_customer_sk
 |  |  runtime filters: RF004[bloom] <- c_customer_sk, RF005[min_max] <- c_customer_sk
-|  |  mem-estimate=87.28MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
+|  |  mem-estimate=130.92MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
 |  |
 |  33:EXCHANGE [HASH(c_customer_sk)]
 |  |  mem-estimate=10.67MB mem-reservation=0B thread-reservation=0
@@ -729,7 +729,7 @@ max-parallelism=30 segment-costs=[216016822]
 |  |  in pipelines: 04(GETNEXT)
 |  |
 |  F05:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
-|  Per-Instance Resources: mem-estimate=24.05MB mem-reservation=1.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=21.37MB mem-reservation=1.00MB thread-reservation=1
 |  max-parallelism=10 segment-costs=[152802831]
 |  04:SCAN HDFS [tpcds_partitioned_parquet_snap.customer, RANDOM]
 |     HDFS partitions=1/1 files=1 size=5.49MB
@@ -743,12 +743,12 @@ max-parallelism=30 segment-costs=[216016822]
 |     in pipelines: 04(GETNEXT)
 |
 32:EXCHANGE [HASH(ss_customer_sk)]
-|  mem-estimate=13.30MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=11.65MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=1,0,3,2 row-size=153B cardinality=13.04M cost=12052336
 |  in pipelines: 01(GETNEXT)
 |
-F04:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
-Per-Instance Resources: mem-estimate=30.10MB mem-reservation=0B thread-reservation=1
+F04:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+Per-Instance Resources: mem-estimate=23.50MB mem-reservation=0B thread-reservation=1
 max-parallelism=20 segment-costs=[171645227]
 08:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=08
@@ -758,14 +758,14 @@ max-parallelism=20 segment-costs=[171645227]
 |  tuple-ids=1,0,3,2 row-size=153B cardinality=13.04M cost=10922206
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
-|--F29:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=182.18MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
-|  |  max-parallelism=20 segment-costs=[34399586] cpu-comparison-result=140 [max(140 (self) vs 25 (sum children))]
+|--F29:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=327.44MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
+|  |  max-parallelism=20 segment-costs=[34399586] cpu-comparison-result=130 [max(130 (self) vs 25 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=08 plan-id=09 cohort-id=01
 |  |  build expressions: ss_item_sk, ss_ticket_number
 |  |  runtime filters: RF006[bloom] <- ss_item_sk, RF007[bloom] <- ss_ticket_number, RF008[min_max] <- ss_item_sk, RF009[min_max] <- ss_ticket_number
-|  |  mem-estimate=145.26MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=18771203
+|  |  mem-estimate=290.53MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=18771203
 |  |
 |  31:EXCHANGE [HASH(ss_item_sk,ss_ticket_number)]
 |  |  mem-estimate=27.91MB mem-reservation=0B thread-reservation=0
@@ -774,7 +774,7 @@ max-parallelism=20 segment-costs=[171645227]
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=18.00MB mem-reservation=18.00MB thread-reservation=0 runtime-filters-memory=18.00MB
-|  Per-Instance Resources: mem-estimate=27.94MB mem-reservation=8.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=21.97MB mem-reservation=8.00MB thread-reservation=1
 |  max-parallelism=330 segment-costs=[3253628617]
 |  07:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=09
@@ -872,7 +872,7 @@ max-parallelism=20 segment-costs=[171645227]
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=20 (adjusted from 120)
 Per-Host Shared Resources: mem-estimate=9.00MB mem-reservation=9.00MB thread-reservation=0 runtime-filters-memory=9.00MB
-Per-Instance Resources: mem-estimate=17.25MB mem-reservation=512.00KB thread-reservation=1
+Per-Instance Resources: mem-estimate=16.62MB mem-reservation=512.00KB thread-reservation=1
 max-parallelism=20 segment-costs=[192281583]
 01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
    HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -886,11 +886,11 @@ max-parallelism=20 segment-costs=[192281583]
    tuple-ids=1 row-size=12B cardinality=33.37M(filtered from 863.99M) cost=149297235
    in pipelines: 01(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=3.42GB Threads=107
-Per-Host Resource Estimates: Memory=24.74GB
+Max Per-Host Resource Reservation: Memory=2.79GB Threads=94
+Per-Host Resource Estimates: Memory=20.17GB
 F20:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=178.20MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[52516691] cpu-comparison-result=515 [max(1 (self) vs 515 (sum children))]
+|  max-parallelism=1 segment-costs=[52516691] cpu-comparison-result=475 [max(1 (self) vs 475 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: $c$1, $c$2, $c$3, $c$4
 |  mem-estimate=100.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=47865236
@@ -903,7 +903,7 @@ PLAN-ROOT SINK
 |
 F10:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name)] hosts=10 instances=10 (adjusted from 120)
 Per-Instance Resources: mem-estimate=168.68MB mem-reservation=46.00MB thread-reservation=1
-max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-result=515 [max(10 (self) vs 515 (sum children))]
+max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-result=475 [max(10 (self) vs 475 (sum children))]
 27:SORT
 |  order by: $c$1 ASC, $c$2 ASC, $c$3 ASC
 |  mem-estimate=77.49MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
@@ -919,7 +919,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |
 |--F21:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name)] hosts=10 instances=10
 |  |  Per-Instance Resources: mem-estimate=16.02KB mem-reservation=0B thread-reservation=1
-|  |  max-parallelism=10 segment-costs=[0] cpu-comparison-result=305 [max(10 (self) vs 305 (sum children))]
+|  |  max-parallelism=10 segment-costs=[0] cpu-comparison-result=285 [max(10 (self) vs 285 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  mem-estimate=16B mem-reservation=0B thread-reservation=0 cost=0
@@ -931,7 +931,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |
 |  F19:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=96.00KB mem-reservation=0B thread-reservation=1
-|  max-parallelism=1 segment-costs=[0, 0] cpu-comparison-result=305 [max(1 (self) vs 305 (sum children))]
+|  max-parallelism=1 segment-costs=[0, 0] cpu-comparison-result=285 [max(1 (self) vs 285 (sum children))]
 |  49:AGGREGATE [FINALIZE]
 |  |  output: avg:merge(netpaid)
 |  |  mem-estimate=16.00KB mem-reservation=0B spill-buffer=2.00MB thread-reservation=0
@@ -943,9 +943,9 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  tuple-ids=18 row-size=16B cardinality=1 cost=0
 |  |  in pipelines: 25(GETNEXT)
 |  |
-|  F18:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)] hosts=10 instances=120
-|  Per-Instance Resources: mem-estimate=542.33MB mem-reservation=34.00MB thread-reservation=1
-|  max-parallelism=750 segment-costs=[7418435974, 77261318, 1] cpu-comparison-result=305 [max(120 (self) vs 305 (sum children))]
+|  F18:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)] hosts=10 instances=70 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=541.28MB mem-reservation=34.00MB thread-reservation=1
+|  max-parallelism=750 segment-costs=[7418435974, 77261318, 1] cpu-comparison-result=285 [max(70 (self) vs 285 (sum children))]
 |  25:AGGREGATE
 |  |  output: avg(sum(ss_net_paid))
 |  |  mem-estimate=16.00KB mem-reservation=0B spill-buffer=2.00MB thread-reservation=0
@@ -955,22 +955,22 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  47:AGGREGATE [FINALIZE]
 |  |  output: sum:merge(ss_net_paid)
 |  |  group by: c_last_name, c_first_name, s_store_name, ca_state, s_state, i_color, i_current_price, i_manager_id, i_units, i_size
-|  |  mem-estimate=513.84MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  |  mem-estimate=515.87MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  |  tuple-ids=16 row-size=154B cardinality=1.10G cost=6514895149
 |  |  in pipelines: 47(GETNEXT), 13(OPEN)
 |  |
 |  46:EXCHANGE [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)]
-|  |  mem-estimate=28.49MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=25.41MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=16 row-size=154B cardinality=1.10G cost=903540825
 |  |  in pipelines: 13(GETNEXT)
 |  |
-|  F14:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  Per-Instance Resources: mem-estimate=607.29MB mem-reservation=34.00MB thread-reservation=1
-|  max-parallelism=1160 segment-costs=[9537419439, 11501468359] cpu-comparison-result=305 [max(240 (self) vs 305 (sum children))]
+|  F14:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=100 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=576.90MB mem-reservation=34.00MB thread-reservation=1
+|  max-parallelism=1160 segment-costs=[9537419439, 11501468359] cpu-comparison-result=285 [max(220 (self) vs 285 (sum children))]
 |  24:AGGREGATE [STREAMING]
 |  |  output: sum(ss_net_paid)
 |  |  group by: c_last_name, c_first_name, s_store_name, ca_state, s_state, i_color, i_current_price, i_manager_id, i_units, i_size
-|  |  mem-estimate=513.13MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  |  mem-estimate=513.56MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  |  tuple-ids=16 row-size=154B cardinality=1.10G cost=6514895149
 |  |  in pipelines: 13(GETNEXT)
 |  |
@@ -984,13 +984,13 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  in pipelines: 13(GETNEXT), 18(OPEN)
 |  |
 |  |--F22:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=1.22GB mem-reservation=408.00MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=1.22GB mem-reservation=340.00MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[34934990]
 |  |  JOIN BUILD
 |  |  |  join-table-id=01 plan-id=02 cohort-id=02
 |  |  |  build expressions: ca_address_sk, ca_zip
 |  |  |  runtime filters: RF016[min_max] <- ca_address_sk, RF017[min_max] <- ca_zip
-|  |  |  mem-estimate=1.21GB mem-reservation=408.00MB spill-buffer=2.00MB thread-reservation=0 cost=15000000
+|  |  |  mem-estimate=1.21GB mem-reservation=340.00MB spill-buffer=2.00MB thread-reservation=0 cost=15000000
 |  |  |
 |  |  45:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.62MB mem-reservation=0B thread-reservation=0
@@ -1019,13 +1019,13 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  in pipelines: 13(GETNEXT), 16(OPEN)
 |  |
 |  |--F23:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=419.26MB mem-reservation=409.00MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=351.26MB mem-reservation=341.00MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[838440]
 |  |  JOIN BUILD
 |  |  |  join-table-id=02 plan-id=03 cohort-id=02
 |  |  |  build expressions: i_item_sk
 |  |  |  runtime filters: RF018[bloom] <- i_item_sk, RF019[min_max] <- i_item_sk
-|  |  |  mem-estimate=408.00MB mem-reservation=408.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
+|  |  |  mem-estimate=340.00MB mem-reservation=340.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
 |  |  |
 |  |  44:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.26MB mem-reservation=0B thread-reservation=0
@@ -1054,13 +1054,13 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  in pipelines: 13(GETNEXT), 17(OPEN)
 |  |
 |  |--F24:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=2.58GB mem-reservation=424.00MB thread-reservation=1 runtime-filters-memory=16.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.58GB mem-reservation=356.00MB thread-reservation=1 runtime-filters-memory=16.00MB
 |  |  |  max-parallelism=10 segment-costs=[69869990]
 |  |  JOIN BUILD
 |  |  |  join-table-id=03 plan-id=04 cohort-id=02
 |  |  |  build expressions: c_customer_sk
 |  |  |  runtime filters: RF020[bloom] <- c_customer_sk, RF021[min_max] <- c_customer_sk
-|  |  |  mem-estimate=2.56GB mem-reservation=408.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
+|  |  |  mem-estimate=2.56GB mem-reservation=340.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
 |  |  |
 |  |  43:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.67MB mem-reservation=0B thread-reservation=0
@@ -1089,14 +1089,14 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  tuple-ids=10,12,11 row-size=91B cardinality=1.20G cost=662301194
 |  |  in pipelines: 13(GETNEXT), 14(OPEN)
 |  |
-|  |--F25:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  |  |  Per-Instance Resources: mem-estimate=316.07MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
+|  |--F25:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=100 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=373.51MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
 |  |  |  max-parallelism=1160 segment-costs=[1007669941]
 |  |  JOIN BUILD
 |  |  |  join-table-id=04 plan-id=05 cohort-id=02
 |  |  |  build expressions: sr_item_sk, sr_ticket_number
 |  |  |  runtime filters: RF022[bloom] <- sr_item_sk, RF023[bloom] <- sr_ticket_number, RF024[min_max] <- sr_item_sk, RF025[min_max] <- sr_ticket_number
-|  |  |  mem-estimate=287.20MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
+|  |  |  mem-estimate=344.64MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
 |  |  |
 |  |  42:EXCHANGE [HASH(sr_item_sk,sr_ticket_number)]
 |  |  |  mem-estimate=11.88MB mem-reservation=0B thread-reservation=0
@@ -1105,7 +1105,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |  |
 |  |  F13:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  |  Per-Instance Resources: mem-estimate=23.50MB mem-reservation=512.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=22.25MB mem-reservation=512.00KB thread-reservation=1
 |  |  max-parallelism=130 segment-costs=[1262114593]
 |  |  14:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |  |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -1126,7 +1126,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |  |
 |  F11:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=35.00MB mem-reservation=35.00MB thread-reservation=0 runtime-filters-memory=35.00MB
-|  Per-Instance Resources: mem-estimate=56.75MB mem-reservation=8.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=49.96MB mem-reservation=8.00MB thread-reservation=1
 |  max-parallelism=1440 segment-costs=[14345766064]
 |  19:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=05
@@ -1193,7 +1193,7 @@ max-parallelism=10 segment-costs=[75699697, 42670965, 25050821] cpu-comparison-r
 |
 F09:PLAN FRAGMENT [HASH(c_last_name,c_first_name,s_store_name,ca_state,s_state,i_color,i_current_price,i_manager_id,i_units,i_size)] hosts=10 instances=10 (adjusted from 120)
 Per-Instance Resources: mem-estimate=270.69MB mem-reservation=68.00MB thread-reservation=1
-max-parallelism=10 segment-costs=[80428225, 70632335, 58495720] cpu-comparison-result=210 [max(10 (self) vs 210 (sum children))]
+max-parallelism=10 segment-costs=[80428225, 70632335, 58495720] cpu-comparison-result=190 [max(10 (self) vs 190 (sum children))]
 12:AGGREGATE [STREAMING]
 |  output: sum(sum(ss_net_paid))
 |  group by: c_last_name, c_first_name, s_store_name
@@ -1214,8 +1214,8 @@ max-parallelism=10 segment-costs=[80428225, 70632335, 58495720] cpu-comparison-r
 |  in pipelines: 01(GETNEXT)
 |
 F08:PLAN FRAGMENT [HASH(c_current_addr_sk,s_zip)] hosts=10 instances=20 (adjusted from 120)
-Per-Instance Resources: mem-estimate=94.08MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=20 segment-costs=[90934267, 124695110] cpu-comparison-result=210 [max(90 (self) vs 210 (sum children))]
+Per-Instance Resources: mem-estimate=91.76MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=20 segment-costs=[90934267, 124695110] cpu-comparison-result=190 [max(70 (self) vs 190 (sum children))]
 11:AGGREGATE [STREAMING]
 |  output: sum(ss_net_paid)
 |  group by: c_last_name, c_first_name, s_store_name, ca_state, s_state, i_color, i_current_price, i_manager_id, i_units, i_size
@@ -1260,12 +1260,12 @@ max-parallelism=20 segment-costs=[90934267, 124695110] cpu-comparison-result=210
 |     in pipelines: 05(GETNEXT)
 |
 34:EXCHANGE [HASH(c_current_addr_sk,s_zip)]
-|  mem-estimate=16.96MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=14.64MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=1,0,3,2,4 row-size=218B cardinality=11.97M cost=15064279
 |  in pipelines: 01(GETNEXT)
 |
-F06:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
-Per-Instance Resources: mem-estimate=31.85MB mem-reservation=0B thread-reservation=1
+F06:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=20 (adjusted from 120)
+Per-Instance Resources: mem-estimate=30.21MB mem-reservation=0B thread-reservation=1
 max-parallelism=30 segment-costs=[216016822]
 09:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=07
@@ -1275,14 +1275,14 @@ max-parallelism=30 segment-costs=[216016822]
 |  tuple-ids=1,0,3,2,4 row-size=218B cardinality=11.97M cost=5511921
 |  in pipelines: 01(GETNEXT), 04(OPEN)
 |
-|--F28:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=113.95MB mem-reservation=50.00MB thread-reservation=1 runtime-filters-memory=16.00MB
+|--F28:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=20 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=157.59MB mem-reservation=50.00MB thread-reservation=1 runtime-filters-memory=16.00MB
 |  |  max-parallelism=30 segment-costs=[42258566]
 |  JOIN BUILD
 |  |  join-table-id=07 plan-id=08 cohort-id=01
 |  |  build expressions: c_customer_sk
 |  |  runtime filters: RF004[bloom] <- c_customer_sk, RF005[min_max] <- c_customer_sk
-|  |  mem-estimate=87.28MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
+|  |  mem-estimate=130.92MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
 |  |
 |  33:EXCHANGE [HASH(c_customer_sk)]
 |  |  mem-estimate=10.67MB mem-reservation=0B thread-reservation=0
@@ -1290,7 +1290,7 @@ max-parallelism=30 segment-costs=[216016822]
 |  |  in pipelines: 04(GETNEXT)
 |  |
 |  F05:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
-|  Per-Instance Resources: mem-estimate=24.05MB mem-reservation=1.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=21.37MB mem-reservation=1.00MB thread-reservation=1
 |  max-parallelism=10 segment-costs=[152802831]
 |  04:SCAN HDFS [tpcds_partitioned_parquet_snap.customer, RANDOM]
 |     HDFS partitions=1/1 files=1 size=5.49MB
@@ -1304,12 +1304,12 @@ max-parallelism=30 segment-costs=[216016822]
 |     in pipelines: 04(GETNEXT)
 |
 32:EXCHANGE [HASH(ss_customer_sk)]
-|  mem-estimate=13.30MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=11.65MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=1,0,3,2 row-size=153B cardinality=13.04M cost=12052336
 |  in pipelines: 01(GETNEXT)
 |
-F04:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
-Per-Instance Resources: mem-estimate=30.10MB mem-reservation=0B thread-reservation=1
+F04:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+Per-Instance Resources: mem-estimate=23.50MB mem-reservation=0B thread-reservation=1
 max-parallelism=20 segment-costs=[171645227]
 08:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=08
@@ -1319,14 +1319,14 @@ max-parallelism=20 segment-costs=[171645227]
 |  tuple-ids=1,0,3,2 row-size=153B cardinality=13.04M cost=10922206
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
-|--F29:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=182.18MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
-|  |  max-parallelism=20 segment-costs=[34399586] cpu-comparison-result=140 [max(140 (self) vs 25 (sum children))]
+|--F29:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=327.44MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
+|  |  max-parallelism=20 segment-costs=[34399586] cpu-comparison-result=130 [max(130 (self) vs 25 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=08 plan-id=09 cohort-id=01
 |  |  build expressions: ss_item_sk, ss_ticket_number
 |  |  runtime filters: RF006[bloom] <- ss_item_sk, RF007[bloom] <- ss_ticket_number, RF008[min_max] <- ss_item_sk, RF009[min_max] <- ss_ticket_number
-|  |  mem-estimate=145.26MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=18771203
+|  |  mem-estimate=290.53MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=18771203
 |  |
 |  31:EXCHANGE [HASH(ss_item_sk,ss_ticket_number)]
 |  |  mem-estimate=27.91MB mem-reservation=0B thread-reservation=0
@@ -1335,7 +1335,7 @@ max-parallelism=20 segment-costs=[171645227]
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=18.00MB mem-reservation=18.00MB thread-reservation=0 runtime-filters-memory=18.00MB
-|  Per-Instance Resources: mem-estimate=27.94MB mem-reservation=8.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=21.97MB mem-reservation=8.00MB thread-reservation=1
 |  max-parallelism=330 segment-costs=[3253628617]
 |  07:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=09
@@ -1433,7 +1433,7 @@ max-parallelism=20 segment-costs=[171645227]
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=20 (adjusted from 120)
 Per-Host Shared Resources: mem-estimate=9.00MB mem-reservation=9.00MB thread-reservation=0 runtime-filters-memory=9.00MB
-Per-Instance Resources: mem-estimate=17.25MB mem-reservation=512.00KB thread-reservation=1
+Per-Instance Resources: mem-estimate=16.62MB mem-reservation=512.00KB thread-reservation=1
 max-parallelism=20 segment-costs=[192281583]
 01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
    HDFS partitions=2004/2004 files=2004 size=33.63MB
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q25.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q25.test
index 490a5e0d8..a35847caa 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q25.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q25.test
@@ -221,11 +221,11 @@ PLAN-ROOT SINK
    tuple-ids=2 row-size=16B cardinality=178.12M(filtered from 4.32G) cost=64145725
    in pipelines: 02(GETNEXT)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=802.90MB Threads=41
-Per-Host Resource Estimates: Memory=4.76GB
+Max Per-Host Resource Reservation: Memory=494.09MB Threads=35
+Per-Host Resource Estimates: Memory=4.38GB
 F11:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=4.23MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[771] cpu-comparison-result=206 [max(1 (self) vs 206 (sum children))]
+|  max-parallelism=1 segment-costs=[771] cpu-comparison-result=176 [max(1 (self) vs 176 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: i_item_id, i_item_desc, s_store_id, s_store_name, sum(ss_net_profit), sum(sr_net_loss), sum(cs_net_profit)
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=700
@@ -239,7 +239,7 @@ PLAN-ROOT SINK
 |
 F10:PLAN FRAGMENT [HASH(i_item_id,i_item_desc,s_store_id,s_store_name)] hosts=10 instances=10 (adjusted from 120)
 Per-Instance Resources: mem-estimate=46.31MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=10 segment-costs=[9733044, 15468543, 640] cpu-comparison-result=206 [max(10 (self) vs 206 (sum children))]
+max-parallelism=10 segment-costs=[9733044, 15468543, 640] cpu-comparison-result=176 [max(10 (self) vs 176 (sum children))]
 16:TOP-N [LIMIT=100]
 |  order by: i_item_id ASC, i_item_desc ASC, s_store_id ASC, s_store_name ASC
 |  mem-estimate=22.71KB mem-reservation=0B thread-reservation=0
@@ -260,7 +260,7 @@ max-parallelism=10 segment-costs=[9733044, 15468543, 640] cpu-comparison-result=
 |
 F07:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10 (adjusted from 120)
 Per-Instance Resources: mem-estimate=54.02MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=10 segment-costs=[96713246, 20872707] cpu-comparison-result=206 [max(50 (self) vs 206 (sum children))]
+max-parallelism=10 segment-costs=[96713246, 20872707] cpu-comparison-result=176 [max(50 (self) vs 176 (sum children))]
 15:AGGREGATE [STREAMING]
 |  output: sum(ss_net_profit), sum(sr_net_loss), sum(cs_net_profit)
 |  group by: i_item_id, i_item_desc, s_store_id, s_store_name
@@ -350,8 +350,8 @@ max-parallelism=10 segment-costs=[96713246, 20872707] cpu-comparison-result=206
 |  in pipelines: 02(GETNEXT), 01(OPEN)
 |
 |--F14:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=509.01MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
-|  |  max-parallelism=10 segment-costs=[47525353] cpu-comparison-result=184 [max(80 (self) vs 184 (sum children))]
+|  |  Per-Instance Resources: mem-estimate=501.96MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
+|  |  max-parallelism=10 segment-costs=[47525353] cpu-comparison-result=154 [max(50 (self) vs 154 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=02 plan-id=03 cohort-id=01
 |  |  build expressions: sr_customer_sk, sr_item_sk
@@ -359,11 +359,11 @@ max-parallelism=10 segment-costs=[96713246, 20872707] cpu-comparison-result=206
 |  |  mem-estimate=478.27MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=20908115
 |  |
 |  23:EXCHANGE [HASH(sr_customer_sk,sr_item_sk)]
-|  |  mem-estimate=21.75MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=14.70MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=1,0,3,4,7 row-size=221B cardinality=20.91M cost=26617238
 |  |  in pipelines: 01(GETNEXT)
 |  |
-|  F04:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=50 (adjusted from 120)
+|  F04:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
 |  Per-Instance Resources: mem-estimate=19.95MB mem-reservation=0B thread-reservation=1
 |  max-parallelism=50 segment-costs=[465577282]
 |  11:HASH JOIN [INNER JOIN, BROADCAST]
@@ -375,13 +375,13 @@ max-parallelism=10 segment-costs=[96713246, 20872707] cpu-comparison-result=206
 |  |  in pipelines: 01(GETNEXT), 07(OPEN)
 |  |
 |  |--F15:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=181.58MB mem-reservation=171.00MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=79.58MB mem-reservation=69.00MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[838440]
 |  |  JOIN BUILD
 |  |  |  join-table-id=03 plan-id=04 cohort-id=02
 |  |  |  build expressions: i_item_sk
 |  |  |  runtime filters: RF008[bloom] <- i_item_sk, RF009[min_max] <- i_item_sk
-|  |  |  mem-estimate=170.00MB mem-reservation=170.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
+|  |  |  mem-estimate=68.00MB mem-reservation=68.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
 |  |  |
 |  |  21:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.58MB mem-reservation=0B thread-reservation=0
@@ -410,13 +410,13 @@ max-parallelism=10 segment-costs=[96713246, 20872707] cpu-comparison-result=206
 |  |  in pipelines: 01(GETNEXT), 04(OPEN)
 |  |
 |  |--F16:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=10.70MB mem-reservation=10.69MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=4.89MB mem-reservation=4.88MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[268]
 |  |  JOIN BUILD
 |  |  |  join-table-id=04 plan-id=05 cohort-id=02
 |  |  |  build expressions: d2.d_date_sk
 |  |  |  runtime filters: RF010[bloom] <- d2.d_date_sk
-|  |  |  mem-estimate=9.69MB mem-reservation=9.69MB spill-buffer=64.00KB thread-reservation=0 cost=118
+|  |  |  mem-estimate=3.88MB mem-reservation=3.88MB spill-buffer=64.00KB thread-reservation=0 cost=118
 |  |  |
 |  |  20:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -447,14 +447,14 @@ max-parallelism=10 segment-costs=[96713246, 20872707] cpu-comparison-result=206
 |  |  tuple-ids=1,0,3 row-size=64B cardinality=50.87M(filtered from 355.26M) cost=77422386
 |  |  in pipelines: 01(GETNEXT), 00(OPEN)
 |  |
-|  |--F17:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=50 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=684.17MB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
-|  |  |  max-parallelism=50 segment-costs=[681366890] cpu-comparison-result=159 [max(159 (self) vs 11 (sum children))]
+|  |--F17:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=1.60GB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
+|  |  |  max-parallelism=50 segment-costs=[681366890] cpu-comparison-result=129 [max(129 (self) vs 11 (sum children))]
 |  |  JOIN BUILD
 |  |  |  join-table-id=05 plan-id=06 cohort-id=02
 |  |  |  build expressions: ss_customer_sk, ss_item_sk, ss_ticket_number
 |  |  |  runtime filters: RF012[bloom] <- ss_customer_sk, RF013[bloom] <- ss_item_sk, RF014[bloom] <- ss_ticket_number, RF015[min_max] <- ss_customer_sk, RF016[min_max] <- ss_item_sk, RF017[min_max] <- ss_ticket_number
-|  |  |  mem-estimate=636.06MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=511575111
+|  |  |  mem-estimate=1.55GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=511575111
 |  |  |
 |  |  19:EXCHANGE [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)]
 |  |  |  mem-estimate=15.11MB mem-reservation=0B thread-reservation=0
@@ -463,7 +463,7 @@ max-parallelism=10 segment-costs=[96713246, 20872707] cpu-comparison-result=206
 |  |  |
 |  |  F02:PLAN FRAGMENT [RANDOM] hosts=10 instances=109 (adjusted from 120)
 |  |  Per-Host Shared Resources: mem-estimate=3.00MB mem-reservation=3.00MB thread-reservation=0 runtime-filters-memory=3.00MB
-|  |  Per-Instance Resources: mem-estimate=25.38MB mem-reservation=8.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=19.75MB mem-reservation=8.00MB thread-reservation=1
 |  |  max-parallelism=109 segment-costs=[2275127990]
 |  |  08:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  |  hash-table-id=06
@@ -522,7 +522,7 @@ max-parallelism=10 segment-costs=[96713246, 20872707] cpu-comparison-result=206
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=20 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=35.00MB mem-reservation=35.00MB thread-reservation=0 runtime-filters-memory=35.00MB
-|  Per-Instance Resources: mem-estimate=21.47MB mem-reservation=512.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=18.19MB mem-reservation=512.00KB thread-reservation=1
 |  max-parallelism=20 segment-costs=[122422189]
 |  01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -557,11 +557,11 @@ max-parallelism=40 segment-costs=[339445445]
    tuple-ids=2 row-size=16B cardinality=178.12M(filtered from 4.32G) cost=64145725
    in pipelines: 02(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=557.40MB Threads=47
-Per-Host Resource Estimates: Memory=4.69GB
+Max Per-Host Resource Reservation: Memory=368.65MB Threads=37
+Per-Host Resource Estimates: Memory=4.31GB
 F12:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=4.23MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[771] cpu-comparison-result=216 [max(1 (self) vs 216 (sum children))]
+|  max-parallelism=1 segment-costs=[771] cpu-comparison-result=176 [max(1 (self) vs 176 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: i_item_id, i_item_desc, s_store_id, s_store_name, sum(ss_net_profit), sum(sr_net_loss), sum(cs_net_profit)
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=700
@@ -574,8 +574,8 @@ PLAN-ROOT SINK
 |  in pipelines: 16(GETNEXT)
 |
 F11:PLAN FRAGMENT [HASH(i_item_id,i_item_desc,s_store_id,s_store_name)] hosts=10 instances=10 (adjusted from 120)
-Per-Instance Resources: mem-estimate=48.62MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=10 segment-costs=[9733044, 15468543, 640] cpu-comparison-result=216 [max(10 (self) vs 216 (sum children))]
+Per-Instance Resources: mem-estimate=46.31MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=10 segment-costs=[9733044, 15468543, 640] cpu-comparison-result=176 [max(10 (self) vs 176 (sum children))]
 16:TOP-N [LIMIT=100]
 |  order by: i_item_id ASC, i_item_desc ASC, s_store_id ASC, s_store_name ASC
 |  mem-estimate=22.71KB mem-reservation=0B thread-reservation=0
@@ -590,17 +590,17 @@ max-parallelism=10 segment-costs=[9733044, 15468543, 640] cpu-comparison-result=
 |  in pipelines: 28(GETNEXT), 02(OPEN)
 |
 27:EXCHANGE [HASH(i_item_id,i_item_desc,s_store_id,s_store_name)]
-|  mem-estimate=14.62MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=12.31MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=8 row-size=233B cardinality=1.35M cost=1591022
 |  in pipelines: 02(GETNEXT)
 |
-F08:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=20 (adjusted from 120)
-Per-Instance Resources: mem-estimate=37.22MB mem-reservation=17.00MB thread-reservation=1
-max-parallelism=20 segment-costs=[140962040, 20872707] cpu-comparison-result=216 [max(70 (self) vs 216 (sum children))]
+F08:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10 (adjusted from 120)
+Per-Instance Resources: mem-estimate=54.22MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=20 segment-costs=[140962040, 20872707] cpu-comparison-result=176 [max(60 (self) vs 176 (sum children))]
 15:AGGREGATE [STREAMING]
 |  output: sum(ss_net_profit), sum(sr_net_loss), sum(cs_net_profit)
 |  group by: i_item_id, i_item_desc, s_store_id, s_store_name
-|  mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB thread-reservation=0
+|  mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=8 row-size=233B cardinality=1.35M cost=8142022
 |  in pipelines: 02(GETNEXT)
 |
@@ -613,13 +613,13 @@ max-parallelism=20 segment-costs=[140962040, 20872707] cpu-comparison-result=216
 |  in pipelines: 02(GETNEXT), 06(OPEN)
 |
 |--F13:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=4.99MB mem-reservation=4.88MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=3.05MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[3140]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: s_store_sk
 |  |  runtime filters: RF000[bloom] <- s_store_sk, RF001[min_max] <- s_store_sk
-|  |  mem-estimate=3.88MB mem-reservation=3.88MB spill-buffer=64.00KB thread-reservation=0 cost=1350
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=1350
 |  |
 |  26:EXCHANGE [BROADCAST]
 |  |  mem-estimate=115.14KB mem-reservation=0B thread-reservation=0
@@ -648,13 +648,13 @@ max-parallelism=20 segment-costs=[140962040, 20872707] cpu-comparison-result=216
 |  in pipelines: 02(GETNEXT), 05(OPEN)
 |
 |--F14:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=4.89MB mem-reservation=4.88MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[268]
 |  JOIN BUILD
 |  |  join-table-id=01 plan-id=02 cohort-id=01
 |  |  build expressions: d3.d_date_sk
 |  |  runtime filters: RF002[bloom] <- d3.d_date_sk
-|  |  mem-estimate=3.88MB mem-reservation=3.88MB spill-buffer=64.00KB thread-reservation=0 cost=118
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=118
 |  |
 |  25:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -685,39 +685,39 @@ max-parallelism=20 segment-costs=[140962040, 20872707] cpu-comparison-result=216
 |  tuple-ids=2,1,0,3,4,7 row-size=237B cardinality=20.91M cost=75200783
 |  in pipelines: 02(GETNEXT), 01(OPEN)
 |
-|--F15:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=20 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=267.53MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
-|  |  max-parallelism=20 segment-costs=[47525353] cpu-comparison-result=194 [max(110 (self) vs 194 (sum children))]
+|--F15:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=501.96MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
+|  |  max-parallelism=20 segment-costs=[47525353] cpu-comparison-result=154 [max(60 (self) vs 154 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=02 plan-id=03 cohort-id=01
 |  |  build expressions: sr_customer_sk, sr_item_sk
 |  |  runtime filters: RF004[bloom] <- sr_customer_sk, RF005[bloom] <- sr_item_sk, RF006[min_max] <- sr_customer_sk, RF007[min_max] <- sr_item_sk
-|  |  mem-estimate=239.13MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=20908115
+|  |  mem-estimate=478.27MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=20908115
 |  |
 |  24:EXCHANGE [HASH(sr_customer_sk,sr_item_sk)]
-|  |  mem-estimate=19.40MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=14.70MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=1,0,3,4,7 row-size=221B cardinality=20.91M cost=26617238
 |  |  in pipelines: 01(GETNEXT)
 |  |
-|  F07:PLAN FRAGMENT [HASH(ss_item_sk)] hosts=10 instances=40 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=31.49MB mem-reservation=0B thread-reservation=1
+|  F07:PLAN FRAGMENT [HASH(ss_item_sk)] hosts=10 instances=20 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=20.30MB mem-reservation=0B thread-reservation=1
 |  max-parallelism=40 segment-costs=[371993474]
 |  11:HASH JOIN [INNER JOIN, PARTITIONED]
 |  |  hash-table-id=03
 |  |  hash predicates: ss_item_sk = i_item_sk
 |  |  fk/pk conjuncts: ss_item_sk = i_item_sk
-|  |  mem-estimate=0B mem-reservation=0B spill-buffer=128.00KB thread-reservation=0
+|  |  mem-estimate=0B mem-reservation=0B spill-buffer=256.00KB thread-reservation=0
 |  |  tuple-ids=1,0,3,4,7 row-size=221B cardinality=20.91M cost=9154163
 |  |  in pipelines: 01(GETNEXT), 07(OPEN)
 |  |
-|  |--F16:PLAN FRAGMENT [HASH(ss_item_sk)] hosts=10 instances=40 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=14.46MB mem-reservation=3.88MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |--F16:PLAN FRAGMENT [HASH(ss_item_sk)] hosts=10 instances=20 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=16.33MB mem-reservation=5.75MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=40 segment-costs=[639452]
 |  |  JOIN BUILD
 |  |  |  join-table-id=03 plan-id=04 cohort-id=02
 |  |  |  build expressions: i_item_sk
 |  |  |  runtime filters: RF008[bloom] <- i_item_sk, RF009[min_max] <- i_item_sk
-|  |  |  mem-estimate=2.88MB mem-reservation=2.88MB spill-buffer=128.00KB thread-reservation=0 cost=360000
+|  |  |  mem-estimate=4.75MB mem-reservation=4.75MB spill-buffer=256.00KB thread-reservation=0 cost=360000
 |  |  |
 |  |  22:EXCHANGE [HASH(i_item_sk)]
 |  |  |  mem-estimate=10.58MB mem-reservation=0B thread-reservation=0
@@ -725,7 +725,7 @@ max-parallelism=20 segment-costs=[140962040, 20872707] cpu-comparison-result=216
 |  |  |  in pipelines: 07(GETNEXT)
 |  |  |
 |  |  F06:PLAN FRAGMENT [RANDOM] hosts=4 instances=4
-|  |  Per-Instance Resources: mem-estimate=39.22MB mem-reservation=512.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=27.61MB mem-reservation=512.00KB thread-reservation=1
 |  |  max-parallelism=4 segment-costs=[4163054]
 |  |  07:SCAN HDFS [tpcds_partitioned_parquet_snap.item, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=1.73MB
@@ -738,12 +738,12 @@ max-parallelism=20 segment-costs=[140962040, 20872707] cpu-comparison-result=216
 |  |     in pipelines: 07(GETNEXT)
 |  |
 |  21:EXCHANGE [HASH(ss_item_sk)]
-|  |  mem-estimate=12.70MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=10.90MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=1,0,3,4 row-size=76B cardinality=20.92M cost=11946594
 |  |  in pipelines: 01(GETNEXT)
 |  |
-|  F04:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=30 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=24.92MB mem-reservation=0B thread-reservation=1
+|  F04:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=17.73MB mem-reservation=0B thread-reservation=1
 |  max-parallelism=30 segment-costs=[251023233]
 |  10:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=04
@@ -754,13 +754,13 @@ max-parallelism=20 segment-costs=[140962040, 20872707] cpu-comparison-result=216
 |  |  in pipelines: 01(GETNEXT), 04(OPEN)
 |  |
 |  |--F17:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=6.83MB mem-reservation=6.81MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[268]
 |  |  JOIN BUILD
 |  |  |  join-table-id=04 plan-id=05 cohort-id=02
 |  |  |  build expressions: d2.d_date_sk
 |  |  |  runtime filters: RF010[bloom] <- d2.d_date_sk
-|  |  |  mem-estimate=5.81MB mem-reservation=5.81MB spill-buffer=64.00KB thread-reservation=0 cost=118
+|  |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=118
 |  |  |
 |  |  20:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -791,14 +791,14 @@ max-parallelism=20 segment-costs=[140962040, 20872707] cpu-comparison-result=216
 |  |  tuple-ids=1,0,3 row-size=64B cardinality=50.87M(filtered from 355.26M) cost=77422386
 |  |  in pipelines: 01(GETNEXT), 00(OPEN)
 |  |
-|  |--F18:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=30 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=1.08GB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
-|  |  |  max-parallelism=30 segment-costs=[681366890] cpu-comparison-result=139 [max(139 (self) vs 11 (sum children))]
+|  |--F18:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=3.15GB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
+|  |  |  max-parallelism=30 segment-costs=[681366890] cpu-comparison-result=119 [max(119 (self) vs 11 (sum children))]
 |  |  JOIN BUILD
 |  |  |  join-table-id=05 plan-id=06 cohort-id=02
 |  |  |  build expressions: ss_customer_sk, ss_item_sk, ss_ticket_number
 |  |  |  runtime filters: RF012[bloom] <- ss_customer_sk, RF013[bloom] <- ss_item_sk, RF014[bloom] <- ss_ticket_number, RF015[min_max] <- ss_customer_sk, RF016[min_max] <- ss_item_sk, RF017[min_max] <- ss_ticket_number
-|  |  |  mem-estimate=1.04GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=511575111
+|  |  |  mem-estimate=3.11GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=511575111
 |  |  |
 |  |  19:EXCHANGE [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)]
 |  |  |  mem-estimate=15.11MB mem-reservation=0B thread-reservation=0
@@ -807,7 +807,7 @@ max-parallelism=20 segment-costs=[140962040, 20872707] cpu-comparison-result=216
 |  |  |
 |  |  F02:PLAN FRAGMENT [RANDOM] hosts=10 instances=109 (adjusted from 120)
 |  |  Per-Host Shared Resources: mem-estimate=3.00MB mem-reservation=3.00MB thread-reservation=0 runtime-filters-memory=3.00MB
-|  |  Per-Instance Resources: mem-estimate=21.62MB mem-reservation=8.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=17.88MB mem-reservation=8.00MB thread-reservation=1
 |  |  max-parallelism=109 segment-costs=[2275127990]
 |  |  08:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  |  hash-table-id=06
@@ -866,7 +866,7 @@ max-parallelism=20 segment-costs=[140962040, 20872707] cpu-comparison-result=216
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=20 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=35.00MB mem-reservation=35.00MB thread-reservation=0 runtime-filters-memory=35.00MB
-|  Per-Instance Resources: mem-estimate=19.28MB mem-reservation=512.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=17.09MB mem-reservation=512.00KB thread-reservation=1
 |  max-parallelism=20 segment-costs=[122422189]
 |  01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -887,7 +887,7 @@ max-parallelism=20 segment-costs=[140962040, 20872707] cpu-comparison-result=216
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=50 (adjusted from 120)
 Per-Host Shared Resources: mem-estimate=10.00MB mem-reservation=10.00MB thread-reservation=0 runtime-filters-memory=10.00MB
-Per-Instance Resources: mem-estimate=17.56MB mem-reservation=1.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=16.78MB mem-reservation=1.00MB thread-reservation=1
 max-parallelism=50 segment-costs=[494456636]
 02:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_sales, RANDOM]
    HDFS partitions=1831/1831 files=1831 size=150.82MB
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q29.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q29.test
index 7ee2860d9..95dc2b8e9 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q29.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q29.test
@@ -220,11 +220,11 @@ PLAN-ROOT SINK
    tuple-ids=2 row-size=16B cardinality=1.69G(filtered from 4.32G) cost=607753572
    in pipelines: 02(GETNEXT)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=1.46GB Threads=66
-Per-Host Resource Estimates: Memory=6.37GB
+Max Per-Host Resource Reservation: Memory=697.84MB Threads=48
+Per-Host Resource Estimates: Memory=5.10GB
 F11:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=4.41MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[766] cpu-comparison-result=210 [max(1 (self) vs 210 (sum children))]
+|  max-parallelism=1 segment-costs=[766] cpu-comparison-result=176 [max(1 (self) vs 176 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: i_item_id, i_item_desc, s_store_id, s_store_name, stddev_samp(ss_quantity), stddev_samp(sr_return_quantity), stddev_samp(cs_quantity)
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=700
@@ -237,8 +237,8 @@ PLAN-ROOT SINK
 |  in pipelines: 16(GETNEXT)
 |
 F10:PLAN FRAGMENT [HASH(i_item_id,i_item_desc,s_store_id,s_store_name)] hosts=10 instances=20 (adjusted from 120)
-Per-Instance Resources: mem-estimate=162.93MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=20 segment-costs=[90807070, 169907657, 577] cpu-comparison-result=210 [max(20 (self) vs 210 (sum children))]
+Per-Instance Resources: mem-estimate=150.48MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=20 segment-costs=[90807070, 169907657, 577] cpu-comparison-result=176 [max(20 (self) vs 176 (sum children))]
 16:TOP-N [LIMIT=100]
 |  order by: i_item_id ASC, i_item_desc ASC, s_store_id ASC, s_store_name ASC
 |  mem-estimate=20.37KB mem-reservation=0B thread-reservation=0
@@ -253,17 +253,17 @@ max-parallelism=20 segment-costs=[90807070, 169907657, 577] cpu-comparison-resul
 |  in pipelines: 27(GETNEXT), 02(OPEN)
 |
 26:EXCHANGE [HASH(i_item_id,i_item_desc,s_store_id,s_store_name)]
-|  mem-estimate=28.68MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=16.23MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=8 row-size=209B cardinality=12.77M cost=13664852
 |  in pipelines: 02(GETNEXT)
 |
-F07:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=90 (adjusted from 120)
-Per-Instance Resources: mem-estimate=62.95MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=90 segment-costs=[838762120, 178028327] cpu-comparison-result=210 [max(210 (self) vs 206 (sum children))]
+F07:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=30 (adjusted from 120)
+Per-Instance Resources: mem-estimate=96.07MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=90 segment-costs=[838762120, 178028327] cpu-comparison-result=176 [max(150 (self) vs 176 (sum children))]
 15:AGGREGATE [STREAMING]
 |  output: stddev_samp(ss_quantity), stddev_samp(sr_return_quantity), stddev_samp(cs_quantity)
 |  group by: i_item_id, i_item_desc, s_store_id, s_store_name
-|  mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=67.13MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=8 row-size=209B cardinality=12.77M cost=77142218
 |  in pipelines: 02(GETNEXT)
 |
@@ -276,13 +276,13 @@ max-parallelism=90 segment-costs=[838762120, 178028327] cpu-comparison-result=21
 |  in pipelines: 02(GETNEXT), 06(OPEN)
 |
 |--F12:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=18.55MB mem-reservation=18.44MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=6.92MB mem-reservation=6.81MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[3140]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: s_store_sk
 |  |  runtime filters: RF000[bloom] <- s_store_sk, RF001[min_max] <- s_store_sk
-|  |  mem-estimate=17.44MB mem-reservation=17.44MB spill-buffer=64.00KB thread-reservation=0 cost=1350
+|  |  mem-estimate=5.81MB mem-reservation=5.81MB spill-buffer=64.00KB thread-reservation=0 cost=1350
 |  |
 |  25:EXCHANGE [BROADCAST]
 |  |  mem-estimate=115.14KB mem-reservation=0B thread-reservation=0
@@ -311,13 +311,13 @@ max-parallelism=90 segment-costs=[838762120, 178028327] cpu-comparison-result=21
 |  in pipelines: 02(GETNEXT), 05(OPEN)
 |
 |--F13:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=18.46MB mem-reservation=18.44MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=6.83MB mem-reservation=6.81MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[2598]
 |  JOIN BUILD
 |  |  join-table-id=01 plan-id=02 cohort-id=01
 |  |  build expressions: d3.d_date_sk
 |  |  runtime filters: RF002[bloom] <- d3.d_date_sk
-|  |  mem-estimate=17.44MB mem-reservation=17.44MB spill-buffer=64.00KB thread-reservation=0 cost=1118
+|  |  mem-estimate=5.81MB mem-reservation=5.81MB spill-buffer=64.00KB thread-reservation=0 cost=1118
 |  |
 |  24:EXCHANGE [BROADCAST]
 |  |  mem-estimate=20.73KB mem-reservation=0B thread-reservation=0
@@ -348,22 +348,22 @@ max-parallelism=90 segment-costs=[838762120, 178028327] cpu-comparison-result=21
 |  tuple-ids=2,1,0,3,4,7 row-size=237B cardinality=20.91M cost=436656892
 |  in pipelines: 02(GETNEXT), 01(OPEN)
 |
-|--F14:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=90 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=83.89MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
-|  |  max-parallelism=90 segment-costs=[47525353] cpu-comparison-result=184 [max(160 (self) vs 184 (sum children))]
+|--F14:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=30 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=183.12MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
+|  |  max-parallelism=90 segment-costs=[47525353] cpu-comparison-result=154 [max(70 (self) vs 154 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=02 plan-id=03 cohort-id=01
 |  |  build expressions: sr_customer_sk, sr_item_sk
 |  |  runtime filters: RF004[bloom] <- sr_customer_sk, RF005[bloom] <- sr_item_sk, RF006[min_max] <- sr_customer_sk, RF007[min_max] <- sr_item_sk
-|  |  mem-estimate=53.14MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=20908115
+|  |  mem-estimate=159.42MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=20908115
 |  |
 |  23:EXCHANGE [HASH(sr_customer_sk,sr_item_sk)]
-|  |  mem-estimate=21.75MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=14.70MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=1,0,3,4,7 row-size=221B cardinality=20.91M cost=26617238
 |  |  in pipelines: 01(GETNEXT)
 |  |
-|  F04:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=50 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=95.13MB mem-reservation=0B thread-reservation=1
+|  F04:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=38.74MB mem-reservation=0B thread-reservation=1
 |  max-parallelism=50 segment-costs=[465577282]
 |  11:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=03
@@ -374,13 +374,13 @@ max-parallelism=90 segment-costs=[838762120, 178028327] cpu-comparison-result=21
 |  |  in pipelines: 01(GETNEXT), 07(OPEN)
 |  |
 |  |--F15:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=181.58MB mem-reservation=171.00MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=79.58MB mem-reservation=69.00MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[838440]
 |  |  JOIN BUILD
 |  |  |  join-table-id=03 plan-id=04 cohort-id=02
 |  |  |  build expressions: i_item_sk
 |  |  |  runtime filters: RF008[bloom] <- i_item_sk, RF009[min_max] <- i_item_sk
-|  |  |  mem-estimate=170.00MB mem-reservation=170.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
+|  |  |  mem-estimate=68.00MB mem-reservation=68.00MB spill-buffer=2.00MB thread-reservation=0 cost=360000
 |  |  |
 |  |  21:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.58MB mem-reservation=0B thread-reservation=0
@@ -409,13 +409,13 @@ max-parallelism=90 segment-costs=[838762120, 178028327] cpu-comparison-result=21
 |  |  in pipelines: 01(GETNEXT), 04(OPEN)
 |  |
 |  |--F16:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=10.70MB mem-reservation=10.69MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=4.89MB mem-reservation=4.88MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[268]
 |  |  JOIN BUILD
 |  |  |  join-table-id=04 plan-id=05 cohort-id=02
 |  |  |  build expressions: d2.d_date_sk
 |  |  |  runtime filters: RF010[bloom] <- d2.d_date_sk
-|  |  |  mem-estimate=9.69MB mem-reservation=9.69MB spill-buffer=64.00KB thread-reservation=0 cost=118
+|  |  |  mem-estimate=3.88MB mem-reservation=3.88MB spill-buffer=64.00KB thread-reservation=0 cost=118
 |  |  |
 |  |  20:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -446,14 +446,14 @@ max-parallelism=90 segment-costs=[838762120, 178028327] cpu-comparison-result=21
 |  |  tuple-ids=1,0,3 row-size=64B cardinality=50.87M(filtered from 355.26M) cost=77422386
 |  |  in pipelines: 01(GETNEXT), 00(OPEN)
 |  |
-|  |--F17:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=50 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=684.17MB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
-|  |  |  max-parallelism=50 segment-costs=[681366890] cpu-comparison-result=159 [max(159 (self) vs 11 (sum children))]
+|  |--F17:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=1.60GB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
+|  |  |  max-parallelism=50 segment-costs=[681366890] cpu-comparison-result=129 [max(129 (self) vs 11 (sum children))]
 |  |  JOIN BUILD
 |  |  |  join-table-id=05 plan-id=06 cohort-id=02
 |  |  |  build expressions: ss_customer_sk, ss_item_sk, ss_ticket_number
 |  |  |  runtime filters: RF012[bloom] <- ss_customer_sk, RF013[bloom] <- ss_item_sk, RF014[bloom] <- ss_ticket_number, RF015[min_max] <- ss_customer_sk, RF016[min_max] <- ss_item_sk, RF017[min_max] <- ss_ticket_number
-|  |  |  mem-estimate=636.06MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=511575111
+|  |  |  mem-estimate=1.55GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=511575111
 |  |  |
 |  |  19:EXCHANGE [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)]
 |  |  |  mem-estimate=15.11MB mem-reservation=0B thread-reservation=0
@@ -462,7 +462,7 @@ max-parallelism=90 segment-costs=[838762120, 178028327] cpu-comparison-result=21
 |  |  |
 |  |  F02:PLAN FRAGMENT [RANDOM] hosts=10 instances=109 (adjusted from 120)
 |  |  Per-Host Shared Resources: mem-estimate=3.00MB mem-reservation=3.00MB thread-reservation=0 runtime-filters-memory=3.00MB
-|  |  Per-Instance Resources: mem-estimate=25.38MB mem-reservation=8.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=19.75MB mem-reservation=8.00MB thread-reservation=1
 |  |  max-parallelism=109 segment-costs=[2275127990]
 |  |  08:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  |  hash-table-id=06
@@ -521,7 +521,7 @@ max-parallelism=90 segment-costs=[838762120, 178028327] cpu-comparison-result=21
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=20 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=35.00MB mem-reservation=35.00MB thread-reservation=0 runtime-filters-memory=35.00MB
-|  Per-Instance Resources: mem-estimate=21.47MB mem-reservation=512.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=18.19MB mem-reservation=512.00KB thread-reservation=1
 |  max-parallelism=20 segment-costs=[122422189]
 |  01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -542,7 +542,7 @@ max-parallelism=90 segment-costs=[838762120, 178028327] cpu-comparison-result=21
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 Per-Host Shared Resources: mem-estimate=10.00MB mem-reservation=10.00MB thread-reservation=0 runtime-filters-memory=10.00MB
-Per-Instance Resources: mem-estimate=23.03MB mem-reservation=1.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=18.34MB mem-reservation=1.00MB thread-reservation=1
 max-parallelism=330 segment-costs=[3216101759]
 02:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_sales, RANDOM]
    HDFS partitions=1831/1831 files=1831 size=150.82MB
@@ -556,11 +556,11 @@ max-parallelism=330 segment-costs=[3216101759]
    tuple-ids=2 row-size=16B cardinality=1.69G(filtered from 4.32G) cost=607753572
    in pipelines: 02(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=1.41GB Threads=75
-Per-Host Resource Estimates: Memory=6.53GB
+Max Per-Host Resource Reservation: Memory=652.27MB Threads=51
+Per-Host Resource Estimates: Memory=5.10GB
 F12:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=4.41MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[766] cpu-comparison-result=240 [max(1 (self) vs 240 (sum children))]
+|  max-parallelism=1 segment-costs=[766] cpu-comparison-result=176 [max(1 (self) vs 176 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: i_item_id, i_item_desc, s_store_id, s_store_name, stddev_samp(ss_quantity), stddev_samp(sr_return_quantity), stddev_samp(cs_quantity)
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=700
@@ -573,8 +573,8 @@ PLAN-ROOT SINK
 |  in pipelines: 16(GETNEXT)
 |
 F11:PLAN FRAGMENT [HASH(i_item_id,i_item_desc,s_store_id,s_store_name)] hosts=10 instances=20 (adjusted from 120)
-Per-Instance Resources: mem-estimate=169.16MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=20 segment-costs=[90807070, 169907657, 577] cpu-comparison-result=240 [max(20 (self) vs 240 (sum children))]
+Per-Instance Resources: mem-estimate=152.55MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=20 segment-costs=[90807070, 169907657, 577] cpu-comparison-result=176 [max(20 (self) vs 176 (sum children))]
 16:TOP-N [LIMIT=100]
 |  order by: i_item_id ASC, i_item_desc ASC, s_store_id ASC, s_store_name ASC
 |  mem-estimate=20.37KB mem-reservation=0B thread-reservation=0
@@ -589,17 +589,17 @@ max-parallelism=20 segment-costs=[90807070, 169907657, 577] cpu-comparison-resul
 |  in pipelines: 28(GETNEXT), 02(OPEN)
 |
 27:EXCHANGE [HASH(i_item_id,i_item_desc,s_store_id,s_store_name)]
-|  mem-estimate=34.91MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=18.30MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=8 row-size=209B cardinality=12.77M cost=13664852
 |  in pipelines: 02(GETNEXT)
 |
-F08:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=62.95MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=130 segment-costs=[1258000705, 178028327] cpu-comparison-result=240 [max(240 (self) vs 232 (sum children))]
+F08:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=40 (adjusted from 120)
+Per-Instance Resources: mem-estimate=79.29MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=130 segment-costs=[1258000705, 178028327] cpu-comparison-result=176 [max(160 (self) vs 176 (sum children))]
 15:AGGREGATE [STREAMING]
 |  output: stddev_samp(ss_quantity), stddev_samp(sr_return_quantity), stddev_samp(cs_quantity)
 |  group by: i_item_id, i_item_desc, s_store_id, s_store_name
-|  mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=50.34MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=8 row-size=209B cardinality=12.77M cost=77142218
 |  in pipelines: 02(GETNEXT)
 |
@@ -612,13 +612,13 @@ max-parallelism=130 segment-costs=[1258000705, 178028327] cpu-comparison-result=
 |  in pipelines: 02(GETNEXT), 06(OPEN)
 |
 |--F13:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=24.36MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=8.86MB mem-reservation=8.75MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[3140]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: s_store_sk
 |  |  runtime filters: RF000[bloom] <- s_store_sk, RF001[min_max] <- s_store_sk
-|  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=1350
+|  |  mem-estimate=7.75MB mem-reservation=7.75MB spill-buffer=64.00KB thread-reservation=0 cost=1350
 |  |
 |  26:EXCHANGE [BROADCAST]
 |  |  mem-estimate=115.14KB mem-reservation=0B thread-reservation=0
@@ -647,13 +647,13 @@ max-parallelism=130 segment-costs=[1258000705, 178028327] cpu-comparison-result=
 |  in pipelines: 02(GETNEXT), 05(OPEN)
 |
 |--F14:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=24.27MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=8.77MB mem-reservation=8.75MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[2598]
 |  JOIN BUILD
 |  |  join-table-id=01 plan-id=02 cohort-id=01
 |  |  build expressions: d3.d_date_sk
 |  |  runtime filters: RF002[bloom] <- d3.d_date_sk
-|  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=1118
+|  |  mem-estimate=7.75MB mem-reservation=7.75MB spill-buffer=64.00KB thread-reservation=0 cost=1118
 |  |
 |  25:EXCHANGE [BROADCAST]
 |  |  mem-estimate=20.73KB mem-reservation=0B thread-reservation=0
@@ -684,39 +684,39 @@ max-parallelism=130 segment-costs=[1258000705, 178028327] cpu-comparison-result=
 |  tuple-ids=2,1,0,3,4,7 row-size=237B cardinality=20.91M cost=680389206
 |  in pipelines: 02(GETNEXT), 01(OPEN)
 |
-|--F15:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=120
-|  |  Per-Instance Resources: mem-estimate=68.25MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
-|  |  max-parallelism=130 segment-costs=[47525353] cpu-comparison-result=210 [max(210 (self) vs 194 (sum children))]
+|--F15:PLAN FRAGMENT [HASH(cs_bill_customer_sk,cs_item_sk)] hosts=10 instances=40 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=143.27MB mem-reservation=43.00MB thread-reservation=1 runtime-filters-memory=9.00MB
+|  |  max-parallelism=130 segment-costs=[47525353] cpu-comparison-result=154 [max(90 (self) vs 154 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=02 plan-id=03 cohort-id=01
 |  |  build expressions: sr_customer_sk, sr_item_sk
 |  |  runtime filters: RF004[bloom] <- sr_customer_sk, RF005[bloom] <- sr_item_sk, RF006[min_max] <- sr_customer_sk, RF007[min_max] <- sr_item_sk
-|  |  mem-estimate=39.86MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=20908115
+|  |  mem-estimate=119.57MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=20908115
 |  |
 |  24:EXCHANGE [HASH(sr_customer_sk,sr_item_sk)]
-|  |  mem-estimate=19.40MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=14.70MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=1,0,3,4,7 row-size=221B cardinality=20.91M cost=26617238
 |  |  in pipelines: 01(GETNEXT)
 |  |
-|  F07:PLAN FRAGMENT [HASH(ss_item_sk)] hosts=10 instances=40 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=125.48MB mem-reservation=0B thread-reservation=1
+|  F07:PLAN FRAGMENT [HASH(ss_item_sk)] hosts=10 instances=20 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=48.49MB mem-reservation=0B thread-reservation=1
 |  max-parallelism=40 segment-costs=[371993474]
 |  11:HASH JOIN [INNER JOIN, PARTITIONED]
 |  |  hash-table-id=03
 |  |  hash predicates: ss_item_sk = i_item_sk
 |  |  fk/pk conjuncts: ss_item_sk = i_item_sk
-|  |  mem-estimate=0B mem-reservation=0B spill-buffer=128.00KB thread-reservation=0
+|  |  mem-estimate=0B mem-reservation=0B spill-buffer=256.00KB thread-reservation=0
 |  |  tuple-ids=1,0,3,4,7 row-size=221B cardinality=20.91M cost=9154163
 |  |  in pipelines: 01(GETNEXT), 07(OPEN)
 |  |
-|  |--F16:PLAN FRAGMENT [HASH(ss_item_sk)] hosts=10 instances=40 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=14.46MB mem-reservation=3.88MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |--F16:PLAN FRAGMENT [HASH(ss_item_sk)] hosts=10 instances=20 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=16.33MB mem-reservation=5.75MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=40 segment-costs=[639452]
 |  |  JOIN BUILD
 |  |  |  join-table-id=03 plan-id=04 cohort-id=02
 |  |  |  build expressions: i_item_sk
 |  |  |  runtime filters: RF008[bloom] <- i_item_sk, RF009[min_max] <- i_item_sk
-|  |  |  mem-estimate=2.88MB mem-reservation=2.88MB spill-buffer=128.00KB thread-reservation=0 cost=360000
+|  |  |  mem-estimate=4.75MB mem-reservation=4.75MB spill-buffer=256.00KB thread-reservation=0 cost=360000
 |  |  |
 |  |  22:EXCHANGE [HASH(i_item_sk)]
 |  |  |  mem-estimate=10.58MB mem-reservation=0B thread-reservation=0
@@ -724,7 +724,7 @@ max-parallelism=130 segment-costs=[1258000705, 178028327] cpu-comparison-result=
 |  |  |  in pipelines: 07(GETNEXT)
 |  |  |
 |  |  F06:PLAN FRAGMENT [RANDOM] hosts=4 instances=4
-|  |  Per-Instance Resources: mem-estimate=39.22MB mem-reservation=512.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=27.61MB mem-reservation=512.00KB thread-reservation=1
 |  |  max-parallelism=4 segment-costs=[4163054]
 |  |  07:SCAN HDFS [tpcds_partitioned_parquet_snap.item, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=1.73MB
@@ -737,12 +737,12 @@ max-parallelism=130 segment-costs=[1258000705, 178028327] cpu-comparison-result=
 |  |     in pipelines: 07(GETNEXT)
 |  |
 |  21:EXCHANGE [HASH(ss_item_sk)]
-|  |  mem-estimate=12.70MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=10.90MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=1,0,3,4 row-size=76B cardinality=20.92M cost=11946594
 |  |  in pipelines: 01(GETNEXT)
 |  |
-|  F04:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=30 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=24.92MB mem-reservation=0B thread-reservation=1
+|  F04:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=17.73MB mem-reservation=0B thread-reservation=1
 |  max-parallelism=30 segment-costs=[251023233]
 |  10:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=04
@@ -753,13 +753,13 @@ max-parallelism=130 segment-costs=[1258000705, 178028327] cpu-comparison-result=
 |  |  in pipelines: 01(GETNEXT), 04(OPEN)
 |  |
 |  |--F17:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=6.83MB mem-reservation=6.81MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[268]
 |  |  JOIN BUILD
 |  |  |  join-table-id=04 plan-id=05 cohort-id=02
 |  |  |  build expressions: d2.d_date_sk
 |  |  |  runtime filters: RF010[bloom] <- d2.d_date_sk
-|  |  |  mem-estimate=5.81MB mem-reservation=5.81MB spill-buffer=64.00KB thread-reservation=0 cost=118
+|  |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=118
 |  |  |
 |  |  20:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -790,14 +790,14 @@ max-parallelism=130 segment-costs=[1258000705, 178028327] cpu-comparison-result=
 |  |  tuple-ids=1,0,3 row-size=64B cardinality=50.87M(filtered from 355.26M) cost=77422386
 |  |  in pipelines: 01(GETNEXT), 00(OPEN)
 |  |
-|  |--F18:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=30 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=1.08GB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
-|  |  |  max-parallelism=30 segment-costs=[681366890] cpu-comparison-result=139 [max(139 (self) vs 11 (sum children))]
+|  |--F18:PLAN FRAGMENT [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=3.15GB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
+|  |  |  max-parallelism=30 segment-costs=[681366890] cpu-comparison-result=119 [max(119 (self) vs 11 (sum children))]
 |  |  JOIN BUILD
 |  |  |  join-table-id=05 plan-id=06 cohort-id=02
 |  |  |  build expressions: ss_customer_sk, ss_item_sk, ss_ticket_number
 |  |  |  runtime filters: RF012[bloom] <- ss_customer_sk, RF013[bloom] <- ss_item_sk, RF014[bloom] <- ss_ticket_number, RF015[min_max] <- ss_customer_sk, RF016[min_max] <- ss_item_sk, RF017[min_max] <- ss_ticket_number
-|  |  |  mem-estimate=1.04GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=511575111
+|  |  |  mem-estimate=3.11GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=511575111
 |  |  |
 |  |  19:EXCHANGE [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)]
 |  |  |  mem-estimate=15.11MB mem-reservation=0B thread-reservation=0
@@ -806,7 +806,7 @@ max-parallelism=130 segment-costs=[1258000705, 178028327] cpu-comparison-result=
 |  |  |
 |  |  F02:PLAN FRAGMENT [RANDOM] hosts=10 instances=109 (adjusted from 120)
 |  |  Per-Host Shared Resources: mem-estimate=3.00MB mem-reservation=3.00MB thread-reservation=0 runtime-filters-memory=3.00MB
-|  |  Per-Instance Resources: mem-estimate=21.62MB mem-reservation=8.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=17.88MB mem-reservation=8.00MB thread-reservation=1
 |  |  max-parallelism=109 segment-costs=[2275127990]
 |  |  08:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  |  hash-table-id=06
@@ -865,7 +865,7 @@ max-parallelism=130 segment-costs=[1258000705, 178028327] cpu-comparison-result=
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=20 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=35.00MB mem-reservation=35.00MB thread-reservation=0 runtime-filters-memory=35.00MB
-|  Per-Instance Resources: mem-estimate=19.28MB mem-reservation=512.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=17.09MB mem-reservation=512.00KB thread-reservation=1
 |  max-parallelism=20 segment-costs=[122422189]
 |  01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -886,7 +886,7 @@ max-parallelism=130 segment-costs=[1258000705, 178028327] cpu-comparison-result=
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 Per-Host Shared Resources: mem-estimate=10.00MB mem-reservation=10.00MB thread-reservation=0 runtime-filters-memory=10.00MB
-Per-Instance Resources: mem-estimate=25.38MB mem-reservation=1.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=19.12MB mem-reservation=1.00MB thread-reservation=1
 max-parallelism=470 segment-costs=[4684767119]
 02:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_sales, RANDOM]
    HDFS partitions=1831/1831 files=1831 size=150.82MB
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q40.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q40.test
index 536d7838b..020486aa0 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q40.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q40.test
@@ -141,11 +141,11 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=24B cardinality=143.92M(filtered from 4.32G) cost=49740118
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=686.02MB Threads=42
-Per-Host Resource Estimates: Memory=2.79GB
+Max Per-Host Resource Reservation: Memory=125.52MB Threads=22
+Per-Host Resource Estimates: Memory=2.26GB
 F07:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=4.08MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[440] cpu-comparison-result=226 [max(1 (self) vs 226 (sum children))]
+|  max-parallelism=1 segment-costs=[440] cpu-comparison-result=126 [max(1 (self) vs 126 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: w_state, i_item_id, sum(CASE WHEN d_date < DATE '1999-02-02' THEN cs_sales_price - coalesce(cr_refunded_cash, 0) ELSE 0 END), sum(CASE WHEN d_date >= DATE '1999-02-02' THEN cs_sales_price - coalesce(cr_refunded_cash, 0) ELSE 0 END)
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=400
@@ -158,8 +158,8 @@ PLAN-ROOT SINK
 |  in pipelines: 10(GETNEXT)
 |
 F06:PLAN FRAGMENT [HASH(w_state,i_item_id)] hosts=10 instances=10 (adjusted from 120)
-Per-Instance Resources: mem-estimate=52.38MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=10 segment-costs=[15497645, 28837420, 225] cpu-comparison-result=226 [max(10 (self) vs 226 (sum children))]
+Per-Instance Resources: mem-estimate=44.76MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=10 segment-costs=[15497645, 28837420, 225] cpu-comparison-result=126 [max(10 (self) vs 126 (sum children))]
 10:TOP-N [LIMIT=100]
 |  order by: w_state ASC, i_item_id ASC
 |  mem-estimate=7.23KB mem-reservation=0B thread-reservation=0
@@ -174,17 +174,17 @@ max-parallelism=10 segment-costs=[15497645, 28837420, 225] cpu-comparison-result
 |  in pipelines: 17(GETNEXT), 00(OPEN)
 |
 16:EXCHANGE [HASH(w_state,i_item_id)]
-|  mem-estimate=18.38MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=10.76MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=5 row-size=74B cardinality=2.41M cost=1089208
 |  in pipelines: 00(GETNEXT)
 |
-F02:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=110 (adjusted from 120)
-Per-Instance Resources: mem-estimate=31.14MB mem-reservation=17.00MB thread-reservation=1
-max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=226 [max(150 (self) vs 226 (sum children))]
+F02:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10 (adjusted from 120)
+Per-Instance Resources: mem-estimate=102.63MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=126 [max(50 (self) vs 126 (sum children))]
 09:AGGREGATE [STREAMING]
 |  output: sum(CASE WHEN d_date < DATE '1999-02-02' THEN cs_sales_price - coalesce(cr_refunded_cash, CAST(0 AS DECIMAL(7,2))) ELSE CAST(0 AS DECIMAL(8,2)) END), sum(CASE WHEN d_date >= DATE '1999-02-02' THEN cs_sales_price - coalesce(cr_refunded_cash, CAST(0 AS DECIMAL(7,2))) ELSE CAST(0 AS DECIMAL(8,2)) END)
 |  group by: w_state, i_item_id
-|  mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB thread-reservation=0
+|  mem-estimate=88.49MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=5 row-size=74B cardinality=2.41M cost=85917063
 |  in pipelines: 00(GETNEXT)
 |
@@ -197,13 +197,13 @@ max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=2
 |  in pipelines: 00(GETNEXT), 02(OPEN)
 |
 |--F08:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=22.33MB mem-reservation=22.31MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[42]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: w_warehouse_sk
 |  |  runtime filters: RF000[bloom] <- w_warehouse_sk, RF001[min_max] <- w_warehouse_sk
-|  |  mem-estimate=21.31MB mem-reservation=21.31MB spill-buffer=64.00KB thread-reservation=0 cost=22
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=22
 |  |
 |  15:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -232,13 +232,13 @@ max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=2
 |  in pipelines: 00(GETNEXT), 03(OPEN)
 |
 |--F09:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=34.02MB mem-reservation=32.62MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=5.27MB mem-reservation=3.88MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[83840]
 |  JOIN BUILD
 |  |  join-table-id=01 plan-id=02 cohort-id=01
 |  |  build expressions: i_item_sk
 |  |  runtime filters: RF002[bloom] <- i_item_sk, RF003[min_max] <- i_item_sk
-|  |  mem-estimate=31.62MB mem-reservation=31.62MB spill-buffer=128.00KB thread-reservation=0 cost=36000
+|  |  mem-estimate=2.88MB mem-reservation=2.88MB spill-buffer=128.00KB thread-reservation=0 cost=36000
 |  |
 |  14:EXCHANGE [BROADCAST]
 |  |  mem-estimate=1.39MB mem-reservation=0B thread-reservation=0
@@ -270,13 +270,13 @@ max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=2
 |  in pipelines: 00(GETNEXT), 04(OPEN)
 |
 |--F10:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=22.33MB mem-reservation=22.31MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[141]
 |  JOIN BUILD
 |  |  join-table-id=02 plan-id=03 cohort-id=01
 |  |  build expressions: d_date_sk
 |  |  runtime filters: RF004[bloom] <- d_date_sk
-|  |  mem-estimate=21.31MB mem-reservation=21.31MB spill-buffer=64.00KB thread-reservation=0 cost=61
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=61
 |  |
 |  13:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -307,13 +307,13 @@ max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=2
 |  tuple-ids=0,1N row-size=40B cardinality=143.92M(filtered from 4.32G) cost=819714623
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
-|--F11:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=110 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=183.20MB mem-reservation=34.00MB thread-reservation=1
+|--F11:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=1.86GB mem-reservation=34.00MB thread-reservation=1
 |  |  max-parallelism=110 segment-costs=[511810529]
 |  JOIN BUILD
 |  |  join-table-id=03 plan-id=04 cohort-id=01
 |  |  build expressions: cr_item_sk, cr_order_number
-|  |  mem-estimate=171.64MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=432016991
+|  |  mem-estimate=1.84GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=432016991
 |  |
 |  12:EXCHANGE [HASH(cr_item_sk,cr_order_number)]
 |  |  mem-estimate=11.56MB mem-reservation=0B thread-reservation=0
@@ -322,7 +322,7 @@ max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=2
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=80 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  Per-Instance Resources: mem-estimate=24.59MB mem-reservation=32.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=16.78MB mem-reservation=32.00KB thread-reservation=1
 |  max-parallelism=80 segment-costs=[767262175]
 |  01:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_returns, RANDOM]
 |     HDFS partitions=2060/2060 files=2060 size=30.47MB
@@ -343,7 +343,7 @@ max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=2
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=40 (adjusted from 120)
 Per-Host Shared Resources: mem-estimate=3.00MB mem-reservation=3.00MB thread-reservation=0 runtime-filters-memory=3.00MB
-Per-Instance Resources: mem-estimate=28.03MB mem-reservation=1.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=17.09MB mem-reservation=1.00MB thread-reservation=1
 max-parallelism=40 segment-costs=[346338600]
 00:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_sales, RANDOM]
    HDFS partitions=1831/1831 files=1831 size=150.82MB
@@ -357,11 +357,11 @@ max-parallelism=40 segment-costs=[346338600]
    tuple-ids=0 row-size=24B cardinality=143.92M(filtered from 4.32G) cost=49740118
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=686.02MB Threads=42
-Per-Host Resource Estimates: Memory=2.79GB
+Max Per-Host Resource Reservation: Memory=125.52MB Threads=22
+Per-Host Resource Estimates: Memory=2.26GB
 F07:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=4.08MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[440] cpu-comparison-result=226 [max(1 (self) vs 226 (sum children))]
+|  max-parallelism=1 segment-costs=[440] cpu-comparison-result=126 [max(1 (self) vs 126 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: w_state, i_item_id, sum(CASE WHEN d_date < DATE '1999-02-02' THEN cs_sales_price - coalesce(cr_refunded_cash, 0) ELSE 0 END), sum(CASE WHEN d_date >= DATE '1999-02-02' THEN cs_sales_price - coalesce(cr_refunded_cash, 0) ELSE 0 END)
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=400
@@ -374,8 +374,8 @@ PLAN-ROOT SINK
 |  in pipelines: 10(GETNEXT)
 |
 F06:PLAN FRAGMENT [HASH(w_state,i_item_id)] hosts=10 instances=10 (adjusted from 120)
-Per-Instance Resources: mem-estimate=52.38MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=10 segment-costs=[15497645, 28837420, 225] cpu-comparison-result=226 [max(10 (self) vs 226 (sum children))]
+Per-Instance Resources: mem-estimate=44.76MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=10 segment-costs=[15497645, 28837420, 225] cpu-comparison-result=126 [max(10 (self) vs 126 (sum children))]
 10:TOP-N [LIMIT=100]
 |  order by: w_state ASC, i_item_id ASC
 |  mem-estimate=7.23KB mem-reservation=0B thread-reservation=0
@@ -390,17 +390,17 @@ max-parallelism=10 segment-costs=[15497645, 28837420, 225] cpu-comparison-result
 |  in pipelines: 17(GETNEXT), 00(OPEN)
 |
 16:EXCHANGE [HASH(w_state,i_item_id)]
-|  mem-estimate=18.38MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=10.76MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=5 row-size=74B cardinality=2.41M cost=1089208
 |  in pipelines: 00(GETNEXT)
 |
-F02:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=110 (adjusted from 120)
-Per-Instance Resources: mem-estimate=31.14MB mem-reservation=17.00MB thread-reservation=1
-max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=226 [max(150 (self) vs 226 (sum children))]
+F02:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10 (adjusted from 120)
+Per-Instance Resources: mem-estimate=102.63MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=126 [max(50 (self) vs 126 (sum children))]
 09:AGGREGATE [STREAMING]
 |  output: sum(CASE WHEN d_date < DATE '1999-02-02' THEN cs_sales_price - coalesce(cr_refunded_cash, CAST(0 AS DECIMAL(7,2))) ELSE CAST(0 AS DECIMAL(8,2)) END), sum(CASE WHEN d_date >= DATE '1999-02-02' THEN cs_sales_price - coalesce(cr_refunded_cash, CAST(0 AS DECIMAL(7,2))) ELSE CAST(0 AS DECIMAL(8,2)) END)
 |  group by: w_state, i_item_id
-|  mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB thread-reservation=0
+|  mem-estimate=88.49MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=5 row-size=74B cardinality=2.41M cost=85917063
 |  in pipelines: 00(GETNEXT)
 |
@@ -413,13 +413,13 @@ max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=2
 |  in pipelines: 00(GETNEXT), 02(OPEN)
 |
 |--F08:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=22.33MB mem-reservation=22.31MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[42]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: w_warehouse_sk
 |  |  runtime filters: RF000[bloom] <- w_warehouse_sk, RF001[min_max] <- w_warehouse_sk
-|  |  mem-estimate=21.31MB mem-reservation=21.31MB spill-buffer=64.00KB thread-reservation=0 cost=22
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=22
 |  |
 |  15:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -448,13 +448,13 @@ max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=2
 |  in pipelines: 00(GETNEXT), 03(OPEN)
 |
 |--F09:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=34.02MB mem-reservation=32.62MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=5.27MB mem-reservation=3.88MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[83840]
 |  JOIN BUILD
 |  |  join-table-id=01 plan-id=02 cohort-id=01
 |  |  build expressions: i_item_sk
 |  |  runtime filters: RF002[bloom] <- i_item_sk, RF003[min_max] <- i_item_sk
-|  |  mem-estimate=31.62MB mem-reservation=31.62MB spill-buffer=128.00KB thread-reservation=0 cost=36000
+|  |  mem-estimate=2.88MB mem-reservation=2.88MB spill-buffer=128.00KB thread-reservation=0 cost=36000
 |  |
 |  14:EXCHANGE [BROADCAST]
 |  |  mem-estimate=1.39MB mem-reservation=0B thread-reservation=0
@@ -486,13 +486,13 @@ max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=2
 |  in pipelines: 00(GETNEXT), 04(OPEN)
 |
 |--F10:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=22.33MB mem-reservation=22.31MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[141]
 |  JOIN BUILD
 |  |  join-table-id=02 plan-id=03 cohort-id=01
 |  |  build expressions: d_date_sk
 |  |  runtime filters: RF004[bloom] <- d_date_sk
-|  |  mem-estimate=21.31MB mem-reservation=21.31MB spill-buffer=64.00KB thread-reservation=0 cost=61
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=61
 |  |
 |  13:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -523,13 +523,13 @@ max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=2
 |  tuple-ids=0,1N row-size=40B cardinality=143.92M(filtered from 4.32G) cost=819714623
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
-|--F11:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=110 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=183.20MB mem-reservation=34.00MB thread-reservation=1
+|--F11:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=1.86GB mem-reservation=34.00MB thread-reservation=1
 |  |  max-parallelism=110 segment-costs=[511810529]
 |  JOIN BUILD
 |  |  join-table-id=03 plan-id=04 cohort-id=01
 |  |  build expressions: cr_item_sk, cr_order_number
-|  |  mem-estimate=171.64MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=432016991
+|  |  mem-estimate=1.84GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=432016991
 |  |
 |  12:EXCHANGE [HASH(cr_item_sk,cr_order_number)]
 |  |  mem-estimate=11.56MB mem-reservation=0B thread-reservation=0
@@ -538,7 +538,7 @@ max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=2
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=80 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  Per-Instance Resources: mem-estimate=24.59MB mem-reservation=32.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=16.78MB mem-reservation=32.00KB thread-reservation=1
 |  max-parallelism=80 segment-costs=[767262175]
 |  01:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_returns, RANDOM]
 |     HDFS partitions=2060/2060 files=2060 size=30.47MB
@@ -559,7 +559,7 @@ max-parallelism=110 segment-costs=[1046325850, 12739523] cpu-comparison-result=2
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=40 (adjusted from 120)
 Per-Host Shared Resources: mem-estimate=3.00MB mem-reservation=3.00MB thread-reservation=0 runtime-filters-memory=3.00MB
-Per-Instance Resources: mem-estimate=28.03MB mem-reservation=1.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=17.09MB mem-reservation=1.00MB thread-reservation=1
 max-parallelism=40 segment-costs=[346338600]
 00:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_sales, RANDOM]
    HDFS partitions=1831/1831 files=1831 size=150.82MB
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q43-verbose.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q43-verbose.test
new file mode 100644
index 000000000..1c1293a91
--- /dev/null
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q43-verbose.test
@@ -0,0 +1,199 @@
+# TPCDS-Q43
+# start query 43 in stream 0 using template query43.tpl using seed 845278100
+select  s_store_name, s_store_id,
+        sum(case when (d_day_name='Sunday') then ss_sales_price else null end) sun_sales,
+        sum(case when (d_day_name='Monday') then ss_sales_price else null end) mon_sales,
+        sum(case when (d_day_name='Tuesday') then ss_sales_price else  null end) tue_sales,
+        sum(case when (d_day_name='Wednesday') then ss_sales_price else null end) wed_sales,
+        sum(case when (d_day_name='Thursday') then ss_sales_price else null end) thu_sales,
+        sum(case when (d_day_name='Friday') then ss_sales_price else null end) fri_sales,
+        sum(case when (d_day_name='Saturday') then ss_sales_price else null end) sat_sales
+ from date_dim, store_sales, store
+ where d_date_sk = ss_sold_date_sk and
+       s_store_sk = ss_store_sk and
+       s_gmt_offset = -6 and
+       d_year = 1999
+ group by s_store_name, s_store_id
+ order by s_store_name, s_store_id,sun_sales,mon_sales,tue_sales,wed_sales,thu_sales,fri_sales,sat_sales
+ limit 100;
+
+# end query 43 in stream 0 using template query43.tpl
+---- QUERYOPTIONS
+explain_level=3
+---- PARALLELPLANS
+Max Per-Host Resource Reservation: Memory=188.97MB Threads=18
+Per-Host Resource Estimates: Memory=503MB
+F04:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
+Per-Instance Resources: mem-estimate=4.15MB mem-reservation=4.00MB thread-reservation=1
+max-parallelism=1 segment-costs=[956] cpu-comparison-result=120 [max(1 (self) vs 120 (sum children))]
+SumCost: cost-total=956 max-instances=1 adj-instances=1 cost/inst=956 #cons:#prod=100:100 reduction=1.0 cost/cons=9.56 cost/prod=9.56
+  PLAN-ROOT SINK
+  |  output exprs: s_store_name, s_store_id, sum(CASE WHEN (d_day_name = 'Sunday') THEN ss_sales_price ELSE NULL END), sum(CASE WHEN (d_day_name = 'Monday') THEN ss_sales_price ELSE NULL END), sum(CASE WHEN (d_day_name = 'Tuesday') THEN ss_sales_price ELSE NULL END), sum(CASE WHEN (d_day_name = 'Wednesday') THEN ss_sales_price ELSE NULL END), sum(CASE WHEN (d_day_name = 'Thursday') THEN ss_sales_price ELSE NULL END), sum(CASE WHEN (d_day_name = 'Friday') THEN ss_sales_price ELSE NULL END [...]
+  |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=900
+  |  cost-total=900 max-instances=1 adj-instances=1 cost/inst=900 #cons:#prod=100:100 reduction=1.0 cost/cons=9.0 cost/prod=9.0 total-cost=900.0 cardinality=100
+  |
+  11:MERGING-EXCHANGE [UNPARTITIONED]
+     order by: s_store_name ASC, s_store_id ASC, sum(CASE WHEN (d_day_name = 'Sunday') THEN ss_sales_price ELSE NULL END) ASC, sum(CASE WHEN (d_day_name = 'Monday') THEN ss_sales_price ELSE NULL END) ASC, sum(CASE WHEN (d_day_name = 'Tuesday') THEN ss_sales_price ELSE NULL END) ASC, sum(CASE WHEN (d_day_name = 'Wednesday') THEN ss_sales_price ELSE NULL END) ASC, sum(CASE WHEN (d_day_name = 'Thursday') THEN ss_sales_price ELSE NULL END) ASC, sum(CASE WHEN (d_day_name = 'Friday') THEN ss_s [...]
+     limit: 100
+     mem-estimate=157.71KB mem-reservation=0B thread-reservation=0
+     cost-total=56 max-instances=1 adj-instances=1 cost/inst=56 #cons:#prod=100:100 reduction=1.0 cost/cons=0.56 cost/prod=0.56 total-cost=56.476
+     tuple-ids=4 row-size=156B cardinality=100 cost=56
+     in pipelines: 06(GETNEXT)
+
+F03:PLAN FRAGMENT [HASH(s_store_name,s_store_id)] hosts=10 instances=10 (adjusted from 120)
+Per-Instance Resources: mem-estimate=28.84MB mem-reservation=1.94MB thread-reservation=1
+max-parallelism=10 segment-costs=[48483, 48650, 439] cpu-comparison-result=120 [max(10 (self) vs 120 (sum children))]
+cost-total=439 max-instances=1 adj-instances=10 cost/inst=44 #cons:#prod=100:100 reduction=1.0 cost/cons=4.39 cost/prod=4.39 total-cost=439.9666
+cost-total=48650 max-instances=1 adj-instances=10 cost/inst=4865 #cons:#prod=6780:100 reduction=67.8 cost/cons=7.175516 cost/prod=486.5 total-cost=48650.03791799733
+SumCost: cost-total=48483 max-instances=1 adj-instances=10 cost/inst=4849 #cons:#prod=6780:6780 reduction=1.0 cost/cons=7.150885 cost/prod=7.150885
+  DATASTREAM SINK [FRAGMENT=F04, EXCHANGE=11, UNPARTITIONED]
+  |  mem-estimate=639.76KB mem-reservation=0B thread-reservation=0 cost=439
+  |  cost-total=439 max-instances=1 adj-instances=10 cost/inst=44 #cons:#prod=100:100 reduction=1.0 cost/cons=4.39 cost/prod=4.39 total-cost=439.9666
+  06:TOP-N [LIMIT=100]
+  |  order by: s_store_name ASC, s_store_id ASC, sum(CASE WHEN (d_day_name = 'Sunday') THEN ss_sales_price ELSE NULL END) ASC, sum(CASE WHEN (d_day_name = 'Monday') THEN ss_sales_price ELSE NULL END) ASC, sum(CASE WHEN (d_day_name = 'Tuesday') THEN ss_sales_price ELSE NULL END) ASC, sum(CASE WHEN (d_day_name = 'Wednesday') THEN ss_sales_price ELSE NULL END) ASC, sum(CASE WHEN (d_day_name = 'Thursday') THEN ss_sales_price ELSE NULL END) ASC, sum(CASE WHEN (d_day_name = 'Friday') THEN ss_s [...]
+  |  mem-estimate=15.23KB mem-reservation=0B thread-reservation=0
+  |  cost-total=48650 max-instances=1 adj-instances=10 cost/inst=4865 #cons:#prod=6780:100 reduction=67.8 cost/cons=7.175516 cost/prod=486.5 total-cost=48650.03791799733
+  |  tuple-ids=4 row-size=156B cardinality=100 cost=48650
+  |  in pipelines: 06(GETNEXT), 10(OPEN)
+  |
+  10:AGGREGATE [FINALIZE]
+  |  output: sum:merge(CASE WHEN (d_day_name = 'Sunday') THEN ss_sales_price ELSE NULL END), sum:merge(CASE WHEN (d_day_name = 'Monday') THEN ss_sales_price ELSE NULL END), sum:merge(CASE WHEN (d_day_name = 'Tuesday') THEN ss_sales_price ELSE NULL END), sum:merge(CASE WHEN (d_day_name = 'Wednesday') THEN ss_sales_price ELSE NULL END), sum:merge(CASE WHEN (d_day_name = 'Thursday') THEN ss_sales_price ELSE NULL END), sum:merge(CASE WHEN (d_day_name = 'Friday') THEN ss_sales_price ELSE NULL [...]
+  |  group by: s_store_name, s_store_id
+  |  mem-estimate=10.00MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0
+  |  SumCost: cost-total=42867 max-instances=1 adj-instances=10 cost/inst=4287 #cons:#prod=6780:6780 reduction=1.0 cost/cons=6.3225665 cost/prod=6.3225665
+  |  tuple-ids=3 row-size=156B cardinality=6.78K cost=42867
+  |  in pipelines: 10(GETNEXT), 01(OPEN)
+  |
+  09:EXCHANGE [HASH(s_store_name,s_store_id)]
+     mem-estimate=18.84MB mem-reservation=0B thread-reservation=0
+     cost-total=5616 max-instances=1 adj-instances=10 cost/inst=562 #cons:#prod=6780:6780 reduction=1.0 cost/cons=0.8283186 cost/prod=0.8283186 total-cost=5616.677
+     tuple-ids=3 row-size=156B cardinality=6.78K cost=5616
+     in pipelines: 01(GETNEXT)
+
+F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
+Per-Host Shared Resources: mem-estimate=2.00MB mem-reservation=2.00MB thread-reservation=0 runtime-filters-memory=2.00MB
+Per-Instance Resources: mem-estimate=32.25MB mem-reservation=11.00MB thread-reservation=1
+max-parallelism=330 segment-costs=[3290070641, 71580] cpu-comparison-result=120 [max(120 (self) vs 22 (sum children))]
+cost-total=71580 max-instances=1 adj-instances=120 cost/inst=597 #cons:#prod=6780:6780 reduction=1.0 cost/cons=10.557522 cost/prod=10.557522 total-cost=71580.922
+SumCost: cost-total=3290070641 max-instances=330 adj-instances=120 cost/inst=27417254 #cons:#prod=8639935193:888242617 reduction=9.726999 cost/cons=0.38079804 cost/prod=3.7040224
+  DATASTREAM SINK [FRAGMENT=F03, EXCHANGE=09, HASH(s_store_name,s_store_id)]
+  |  mem-estimate=6.25MB mem-reservation=0B thread-reservation=0 cost=71580
+  |  cost-total=71580 max-instances=1 adj-instances=120 cost/inst=597 #cons:#prod=6780:6780 reduction=1.0 cost/cons=10.557522 cost/prod=10.557522 total-cost=71580.922
+  05:AGGREGATE [STREAMING]
+  |  output: sum(CASE WHEN (d_day_name = 'Sunday') THEN ss_sales_price ELSE NULL END), sum(CASE WHEN (d_day_name = 'Monday') THEN ss_sales_price ELSE NULL END), sum(CASE WHEN (d_day_name = 'Tuesday') THEN ss_sales_price ELSE NULL END), sum(CASE WHEN (d_day_name = 'Wednesday') THEN ss_sales_price ELSE NULL END), sum(CASE WHEN (d_day_name = 'Thursday') THEN ss_sales_price ELSE NULL END), sum(CASE WHEN (d_day_name = 'Friday') THEN ss_sales_price ELSE NULL END), sum(CASE WHEN (d_day_name = ' [...]
+  |  group by: s_store_name, s_store_id
+  |  mem-estimate=10.00MB mem-reservation=3.00MB spill-buffer=128.00KB thread-reservation=0
+  |  SumCost: cost-total=1597280466 max-instances=160 adj-instances=120 cost/inst=13310671 #cons:#prod=888242617:6780 reduction=131009.234 cost/cons=1.7982479 cost/prod=235587.1
+  |  tuple-ids=3 row-size=156B cardinality=6.78K cost=1597280466
+  |  in pipelines: 01(GETNEXT)
+  |
+  04:HASH JOIN [INNER JOIN, BROADCAST]
+  |  hash-table-id=00
+  |  hash predicates: ss_store_sk = s_store_sk
+  |  fk/pk conjuncts: ss_store_sk = s_store_sk
+  |  mem-estimate=0B mem-reservation=0B spill-buffer=64.00KB thread-reservation=0
+  |  cost-total=614141162 max-instances=62 adj-instances=120 cost/inst=5117843 #cons:#prod=1766829189:888242617 reduction=1.9891291 cost/cons=0.3475951 cost/prod=0.6914115 total-cost=6.141411629949E8
+  |  tuple-ids=1,0,2 row-size=91B cardinality=888.24M cost=614141162
+  |  in pipelines: 01(GETNEXT), 02(OPEN)
+  |
+  03:HASH JOIN [INNER JOIN, BROADCAST]
+  |  hash-table-id=01
+  |  hash predicates: ss_sold_date_sk = d_date_sk
+  |  fk/pk conjuncts: ss_sold_date_sk = d_date_sk
+  |  mem-estimate=0B mem-reservation=0B spill-buffer=64.00KB thread-reservation=0
+  |  cost-total=773340988 max-instances=78 adj-instances=120 cost/inst=6444509 #cons:#prod=8639935566:1766828853 reduction=4.890081 cost/cons=0.08950773 cost/prod=0.4377 total-cost=7.733409889581001E8
+  |  tuple-ids=1,0 row-size=39B cardinality=1.77G cost=773340988
+  |  in pipelines: 01(GETNEXT), 00(OPEN)
+  |
+  01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_sales, RANDOM]
+     HDFS partitions=1824/1824 files=1824 size=199.33MB
+     runtime filters: RF001[min_max] -> ss_store_sk, RF000[bloom] -> ss_store_sk, RF002[bloom] -> ss_sold_date_sk
+     stored statistics:
+       table: rows=8.64G size=389.90GB
+       partitions: 1824/1824 rows=8.64G
+       columns: all
+     extrapolated-rows=disabled max-scan-range-rows=390.22M est-scan-range=374(filtered from 1824)
+     file formats: [PARQUET]
+     mem-estimate=16.00MB mem-reservation=8.00MB thread-reservation=0
+     cost-total=305308025 max-instances=31 adj-instances=120 cost/inst=2544234 #cons:#prod=8639935193:8639935193 reduction=1.0 cost/cons=0.03533684 cost/prod=0.03533684 total-cost=3.053080257984E8
+     tuple-ids=1 row-size=12B cardinality=1.77G(filtered from 8.64G) cost=305308025
+     in pipelines: 01(GETNEXT)
+
+F05:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
+Per-Instance Resources: mem-estimate=24.28MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+max-parallelism=10 segment-costs=[776]
+SumCost: cost-total=776 max-instances=1 adj-instances=10 cost/inst=78 #cons:#prod=336:336 reduction=1.0 cost/cons=2.3095238 cost/prod=2.3095238
+  JOIN BUILD
+  |  join-table-id=00 plan-id=01 cohort-id=01
+  |  build expressions: s_store_sk
+  |  runtime filters: RF000[bloom] <- s_store_sk, RF001[min_max] <- s_store_sk
+  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=336
+  |  cost-total=336 max-instances=1 adj-instances=10 cost/inst=34 #cons:#prod=336:336 reduction=1.0 cost/cons=1.0 cost/prod=1.0 total-cost=336.0
+  |
+  08:EXCHANGE [BROADCAST]
+     mem-estimate=35.40KB mem-reservation=0B thread-reservation=0
+     BroadcastCost(10): cost-total=440 max-instances=1 adj-instances=10 cost/inst=44 #cons:#prod=336:336 reduction=1.0 cost/cons=1.3095238 cost/prod=1.3095238
+     tuple-ids=2 row-size=52B cardinality=336 cost=440
+     in pipelines: 02(GETNEXT)
+
+F02:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
+Per-Instance Resources: mem-estimate=16.22MB mem-reservation=32.00KB thread-reservation=1
+max-parallelism=1 segment-costs=[635]
+SumCost: cost-total=635 max-instances=1 adj-instances=1 cost/inst=635 #cons:#prod=1350:336 reduction=4.017857 cost/cons=0.47037038 cost/prod=1.8898809
+  DATASTREAM SINK [FRAGMENT=F05, EXCHANGE=08, BROADCAST]
+  |  mem-estimate=223.76KB mem-reservation=0B thread-reservation=0 cost=54
+  |  cost-total=54 max-instances=1 adj-instances=1 cost/inst=54 #cons:#prod=336:336 reduction=1.0 cost/cons=0.16071428 cost/prod=0.16071428 total-cost=54.3753
+  02:SCAN HDFS [tpcds_partitioned_parquet_snap.store, RANDOM]
+     HDFS partitions=1/1 files=1 size=9.81KB
+     predicates: s_gmt_offset = CAST(-6 AS DECIMAL(3,0))
+     stored statistics:
+       table: rows=1.35K size=119.76KB
+       columns: all
+     extrapolated-rows=disabled max-scan-range-rows=1.35K
+     parquet statistics predicates: s_gmt_offset = CAST(-6 AS DECIMAL(3,0))
+     parquet dictionary predicates: s_gmt_offset = CAST(-6 AS DECIMAL(3,0))
+     file formats: [PARQUET]
+     mem-estimate=16.00MB mem-reservation=32.00KB thread-reservation=0
+     cost-total=581 max-instances=1 adj-instances=1 cost/inst=581 #cons:#prod=1350:336 reduction=4.017857 cost/cons=0.43037036 cost/prod=1.7291666 total-cost=581.0742
+     tuple-ids=2 row-size=52B cardinality=336 cost=581
+     in pipelines: 02(GETNEXT)
+
+F06:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
+Per-Instance Resources: mem-estimate=24.27MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+max-parallelism=10 segment-costs=[863]
+SumCost: cost-total=863 max-instances=1 adj-instances=10 cost/inst=87 #cons:#prod=373:373 reduction=1.0 cost/cons=2.313673 cost/prod=2.313673
+  JOIN BUILD
+  |  join-table-id=01 plan-id=02 cohort-id=01
+  |  build expressions: d_date_sk
+  |  runtime filters: RF002[bloom] <- d_date_sk
+  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=373
+  |  cost-total=373 max-instances=1 adj-instances=10 cost/inst=38 #cons:#prod=373:373 reduction=1.0 cost/cons=1.0 cost/prod=1.0 total-cost=373.0
+  |
+  07:EXCHANGE [BROADCAST]
+     mem-estimate=21.23KB mem-reservation=0B thread-reservation=0
+     BroadcastCost(10): cost-total=490 max-instances=1 adj-instances=10 cost/inst=49 #cons:#prod=373:373 reduction=1.0 cost/cons=1.3136729 cost/prod=1.3136729
+     tuple-ids=0 row-size=27B cardinality=373 cost=490
+     in pipelines: 00(GETNEXT)
+
+F01:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
+Per-Instance Resources: mem-estimate=16.12MB mem-reservation=512.00KB thread-reservation=1
+max-parallelism=1 segment-costs=[18016]
+SumCost: cost-total=18016 max-instances=1 adj-instances=1 cost/inst=18016 #cons:#prod=73049:373 reduction=195.84183 cost/cons=0.24662897 cost/prod=48.300266
+  DATASTREAM SINK [FRAGMENT=F06, EXCHANGE=07, BROADCAST]
+  |  mem-estimate=124.57KB mem-reservation=0B thread-reservation=0 cost=35
+  |  cost-total=35 max-instances=1 adj-instances=1 cost/inst=35 #cons:#prod=373:373 reduction=1.0 cost/cons=0.09383378 cost/prod=0.09383378 total-cost=35.391600000000004
+  00:SCAN HDFS [tpcds_partitioned_parquet_snap.date_dim, RANDOM]
+     HDFS partitions=1/1 files=1 size=2.17MB
+     predicates: d_year = CAST(1999 AS INT)
+     stored statistics:
+       table: rows=73.05K size=2.17MB
+       columns: all
+     extrapolated-rows=disabled max-scan-range-rows=73.05K
+     parquet statistics predicates: d_year = CAST(1999 AS INT)
+     parquet dictionary predicates: d_year = CAST(1999 AS INT)
+     file formats: [PARQUET]
+     mem-estimate=16.00MB mem-reservation=512.00KB thread-reservation=0
+     cost-total=17981 max-instances=1 adj-instances=1 cost/inst=17981 #cons:#prod=73049:373 reduction=195.84183 cost/cons=0.24614984 cost/prod=48.206436 total-cost=17981.5393
+     tuple-ids=0 row-size=27B cardinality=373 cost=17981
+     in pipelines: 00(GETNEXT)
+====
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q46.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q46.test
index b40dbbf92..b49b36e69 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q46.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q46.test
@@ -474,11 +474,11 @@ max-parallelism=250 segment-costs=[2435507496, 381867406] cpu-comparison-result=
    tuple-ids=0 row-size=36B cardinality=334.01M(filtered from 8.64G) cost=1468425196
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=1.25GB Threads=77
-Per-Host Resource Estimates: Memory=3.66GB
+Max Per-Host Resource Reservation: Memory=1.10GB Threads=70
+Per-Host Resource Estimates: Memory=3.32GB
 F11:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=5.40MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[748] cpu-comparison-result=390 [max(1 (self) vs 390 (sum children))]
+|  max-parallelism=1 segment-costs=[748] cpu-comparison-result=360 [max(1 (self) vs 360 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: c_last_name, c_first_name, ca_city, bought_city, ss_ticket_number, amt, profit
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=700
@@ -492,7 +492,7 @@ PLAN-ROOT SINK
 |
 F10:PLAN FRAGMENT [HASH(customer.c_current_addr_sk)] hosts=10 instances=120
 Per-Instance Resources: mem-estimate=18.28MB mem-reservation=0B thread-reservation=1
-max-parallelism=120 segment-costs=[1118082195, 340] cpu-comparison-result=390 [max(190 (self) vs 390 (sum children))]
+max-parallelism=120 segment-costs=[1118082195, 340] cpu-comparison-result=360 [max(190 (self) vs 360 (sum children))]
 14:TOP-N [LIMIT=100]
 |  order by: c_last_name ASC, c_first_name ASC, ca_city ASC, bought_city ASC, ss_ticket_number ASC
 |  mem-estimate=11.51KB mem-reservation=0B thread-reservation=0
@@ -541,7 +541,7 @@ max-parallelism=120 segment-costs=[1118082195, 340] cpu-comparison-result=390 [m
 |  in pipelines: 21(GETNEXT)
 |
 F08:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=70 (adjusted from 120)
-Per-Instance Resources: mem-estimate=70.24MB mem-reservation=0B thread-reservation=1
+Per-Instance Resources: mem-estimate=69.53MB mem-reservation=0B thread-reservation=1
 max-parallelism=70 segment-costs=[652856305]
 12:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=01
@@ -581,32 +581,32 @@ max-parallelism=70 segment-costs=[652856305]
 |     in pipelines: 10(GETNEXT)
 |
 22:EXCHANGE [HASH(ss_customer_sk)]
-|  mem-estimate=13.56MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=12.85MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=5 row-size=69B cardinality=77.06M cost=33001478
 |  in pipelines: 21(GETNEXT)
 |
-F06:PLAN FRAGMENT [HASH(ss_ticket_number,ss_customer_sk,ss_addr_sk,ca_city)] hosts=10 instances=50 (adjusted from 120)
-Per-Instance Resources: mem-estimate=138.93MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=50 segment-costs=[493224077, 381867406] cpu-comparison-result=180 [max(50 (self) vs 180 (sum children))]
+F06:PLAN FRAGMENT [HASH(ss_ticket_number,ss_customer_sk,ss_addr_sk,ca_city)] hosts=10 instances=40 (adjusted from 120)
+Per-Instance Resources: mem-estimate=168.67MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=50 segment-costs=[493224077, 381867406] cpu-comparison-result=150 [max(40 (self) vs 150 (sum children))]
 21:AGGREGATE [FINALIZE]
 |  output: sum:merge(ss_coupon_amt), sum:merge(ss_net_profit)
 |  group by: ss_ticket_number, ss_customer_sk, ss_addr_sk, ca_city
-|  mem-estimate=118.98MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=148.72MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=5 row-size=69B cardinality=77.06M cost=460222599
 |  in pipelines: 21(GETNEXT), 00(OPEN)
 |
 20:EXCHANGE [HASH(ss_ticket_number,ss_customer_sk,ss_addr_sk,ca_city)]
-|  mem-estimate=14.27MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=12.14MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=5 row-size=69B cardinality=77.06M cost=33001478
 |  in pipelines: 00(GETNEXT)
 |
-F05:PLAN FRAGMENT [HASH(store_sales.ss_addr_sk)] hosts=10 instances=60 (adjusted from 120)
-Per-Instance Resources: mem-estimate=110.46MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=60 segment-costs=[543427107, 381867406] cpu-comparison-result=180 [max(180 (self) vs 103 (sum children))]
+F05:PLAN FRAGMENT [HASH(store_sales.ss_addr_sk)] hosts=10 instances=30 (adjusted from 120)
+Per-Instance Resources: mem-estimate=181.97MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=60 segment-costs=[543427107, 381867406] cpu-comparison-result=150 [max(150 (self) vs 73 (sum children))]
 09:AGGREGATE [STREAMING]
 |  output: sum(ss_coupon_amt), sum(ss_net_profit)
 |  group by: ss_ticket_number, ss_customer_sk, ss_addr_sk, ca_city
-|  mem-estimate=74.36MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=148.72MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=5 row-size=69B cardinality=77.06M cost=460222599
 |  in pipelines: 00(GETNEXT)
 |
@@ -614,18 +614,18 @@ max-parallelism=60 segment-costs=[543427107, 381867406] cpu-comparison-result=18
 |  hash-table-id=02
 |  hash predicates: store_sales.ss_addr_sk = customer_address.ca_address_sk
 |  fk/pk conjuncts: store_sales.ss_addr_sk = customer_address.ca_address_sk
-|  mem-estimate=0B mem-reservation=0B spill-buffer=1.00MB thread-reservation=0
+|  mem-estimate=0B mem-reservation=0B spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=0,2,3,1,4 row-size=110B cardinality=77.06M cost=34389944
 |  in pipelines: 00(GETNEXT), 04(OPEN)
 |
-|--F14:PLAN FRAGMENT [HASH(store_sales.ss_addr_sk)] hosts=10 instances=60 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=35.28MB mem-reservation=25.00MB thread-reservation=1 runtime-filters-memory=8.00MB
+|--F14:PLAN FRAGMENT [HASH(store_sales.ss_addr_sk)] hosts=10 instances=30 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=52.28MB mem-reservation=42.00MB thread-reservation=1 runtime-filters-memory=8.00MB
 |  |  max-parallelism=60 segment-costs=[18388216]
 |  JOIN BUILD
 |  |  join-table-id=02 plan-id=03 cohort-id=01
 |  |  build expressions: customer_address.ca_address_sk
 |  |  runtime filters: RF004[bloom] <- customer_address.ca_address_sk, RF005[min_max] <- customer_address.ca_address_sk
-|  |  mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB thread-reservation=0 cost=15000000
+|  |  mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=15000000
 |  |
 |  19:EXCHANGE [HASH(customer_address.ca_address_sk)]
 |  |  mem-estimate=10.28MB mem-reservation=0B thread-reservation=0
@@ -633,7 +633,7 @@ max-parallelism=60 segment-costs=[543427107, 381867406] cpu-comparison-result=18
 |  |  in pipelines: 04(GETNEXT)
 |  |
 |  F04:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
-|  Per-Instance Resources: mem-estimate=22.79MB mem-reservation=128.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=19.39MB mem-reservation=128.00KB thread-reservation=1
 |  max-parallelism=10 segment-costs=[34629749]
 |  04:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |     HDFS partitions=1/1 files=1 size=1.16MB
@@ -652,7 +652,7 @@ max-parallelism=60 segment-costs=[543427107, 381867406] cpu-comparison-result=18
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 Per-Host Shared Resources: mem-estimate=27.00MB mem-reservation=27.00MB thread-reservation=0 runtime-filters-memory=27.00MB
-Per-Instance Resources: mem-estimate=39.69MB mem-reservation=8.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=27.85MB mem-reservation=8.00MB thread-reservation=1
 max-parallelism=260 segment-costs=[2541458132]
 07:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash-table-id=03
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q49.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q49.test
index 6d53e765d..6921bc5fb 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q49.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q49.test
@@ -458,11 +458,11 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=28B cardinality=12.79M(filtered from 216.00M) cost=62347759
    in pipelines: 01(GETNEXT)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=370.03MB Threads=41
-Per-Host Resource Estimates: Memory=1.26GB
+Max Per-Host Resource Reservation: Memory=259.22MB Threads=35
+Per-Host Resource Estimates: Memory=1.13GB
 F18:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=52.64MB mem-reservation=22.50MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[2088323, 2088323, 2088323, 2818097, 1018681, 500] cpu-comparison-result=203 [max(1 (self) vs 203 (sum children))]
+|  max-parallelism=1 segment-costs=[2088323, 2088323, 2088323, 2818097, 1018681, 500] cpu-comparison-result=173 [max(1 (self) vs 173 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: channel, item, return_ratio, return_rank, currency_rank
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=500
@@ -521,7 +521,7 @@ PLAN-ROOT SINK
 |  |
 |  F16:PLAN FRAGMENT [HASH(sts.ss_item_sk)] hosts=10 instances=10 (adjusted from 120)
 |  Per-Instance Resources: mem-estimate=16.00MB mem-reservation=10.75MB thread-reservation=1
-|  max-parallelism=10 segment-costs=[1242311, 1212041, 754901] cpu-comparison-result=101 [max(10 (self) vs 101 (sum children))]
+|  max-parallelism=10 segment-costs=[1242311, 1212041, 754901] cpu-comparison-result=81 [max(10 (self) vs 81 (sum children))]
 |  29:SORT
 |  |  order by: (CAST(sum(coalesce(sr.sr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(coalesce(sts.ss_quantity, 0)) AS DECIMAL(15,4))) ASC
 |  |  materialized: (CAST(sum(coalesce(sr.sr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(coalesce(sts.ss_quantity, 0)) AS DECIMAL(15,4)))
@@ -537,17 +537,17 @@ PLAN-ROOT SINK
 |  |  in pipelines: 52(GETNEXT), 23(OPEN)
 |  |
 |  51:EXCHANGE [HASH(sts.ss_item_sk)]
-|  |  mem-estimate=3.97MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=2.88MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=19 row-size=52B cardinality=360.18K cost=126171
 |  |  in pipelines: 23(GETNEXT)
 |  |
-|  F14:PLAN FRAGMENT [HASH(sts.ss_item_sk,sts.ss_ticket_number)] hosts=10 instances=40 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=23.44MB mem-reservation=2.00MB thread-reservation=1
-|  max-parallelism=40 segment-costs=[308234156, 1391735] cpu-comparison-result=101 [max(80 (self) vs 101 (sum children))]
+|  F14:PLAN FRAGMENT [HASH(sts.ss_item_sk,sts.ss_ticket_number)] hosts=10 instances=20 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=23.44MB mem-reservation=3.00MB thread-reservation=1
+|  max-parallelism=40 segment-costs=[308234156, 1391735] cpu-comparison-result=81 [max(60 (self) vs 81 (sum children))]
 |  28:AGGREGATE [STREAMING]
 |  |  output: sum(CAST(coalesce(sr.sr_return_quantity, CAST(0 AS INT)) AS BIGINT)), sum(CAST(coalesce(sts.ss_quantity, CAST(0 AS INT)) AS BIGINT)), sum(coalesce(sr.sr_return_amt, CAST(0 AS DECIMAL(7,2)))), sum(coalesce(sts.ss_net_paid, CAST(0 AS DECIMAL(7,2))))
 |  |  group by: sts.ss_item_sk
-|  |  mem-estimate=10.00MB mem-reservation=2.00MB spill-buffer=64.00KB thread-reservation=0
+|  |  mem-estimate=10.00MB mem-reservation=3.00MB spill-buffer=128.00KB thread-reservation=0
 |  |  tuple-ids=19 row-size=52B cardinality=360.18K cost=103892301
 |  |  in pipelines: 23(GETNEXT)
 |  |
@@ -560,13 +560,13 @@ PLAN-ROOT SINK
 |  |  in pipelines: 23(GETNEXT), 25(OPEN)
 |  |
 |  |--F23:PLAN FRAGMENT [HASH(sts.ss_item_sk,sts.ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=8.77MB mem-reservation=8.75MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=4.89MB mem-reservation=4.88MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[248]
 |  |  JOIN BUILD
 |  |  |  join-table-id=04 plan-id=05 cohort-id=03
 |  |  |  build expressions: d_date_sk
 |  |  |  runtime filters: RF004[bloom] <- d_date_sk
-|  |  |  mem-estimate=7.75MB mem-reservation=7.75MB spill-buffer=64.00KB thread-reservation=0 cost=108
+|  |  |  mem-estimate=3.88MB mem-reservation=3.88MB spill-buffer=64.00KB thread-reservation=0 cost=108
 |  |  |
 |  |  50:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -598,13 +598,13 @@ PLAN-ROOT SINK
 |  |  tuple-ids=16,17N row-size=48B cardinality=51.16M(filtered from 863.99M) cost=169677527
 |  |  in pipelines: 23(GETNEXT), 24(OPEN)
 |  |
-|  |--F24:PLAN FRAGMENT [HASH(sts.ss_item_sk,sts.ss_ticket_number)] hosts=10 instances=40 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=90.77MB mem-reservation=34.00MB thread-reservation=1
+|  |--F24:PLAN FRAGMENT [HASH(sts.ss_item_sk,sts.ss_ticket_number)] hosts=10 instances=20 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=170.37MB mem-reservation=34.00MB thread-reservation=1
 |  |  |  max-parallelism=40 segment-costs=[103946472]
 |  |  JOIN BUILD
 |  |  |  join-table-id=05 plan-id=06 cohort-id=03
 |  |  |  build expressions: sr.sr_item_sk, sr.sr_ticket_number
-|  |  |  mem-estimate=79.60MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=86398863
+|  |  |  mem-estimate=159.20MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=86398863
 |  |  |
 |  |  49:EXCHANGE [HASH(sr.sr_item_sk,sr.sr_ticket_number)]
 |  |  |  mem-estimate=11.17MB mem-reservation=0B thread-reservation=0
@@ -612,7 +612,7 @@ PLAN-ROOT SINK
 |  |  |  in pipelines: 24(GETNEXT)
 |  |  |
 |  |  F13:PLAN FRAGMENT [RANDOM] hosts=10 instances=50 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=19.75MB mem-reservation=512.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=17.88MB mem-reservation=512.00KB thread-reservation=1
 |  |  max-parallelism=50 segment-costs=[428901235]
 |  |  24:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns sr, RANDOM]
 |  |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -635,7 +635,7 @@ PLAN-ROOT SINK
 |  |
 |  F12:PLAN FRAGMENT [RANDOM] hosts=10 instances=40 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  Per-Instance Resources: mem-estimate=21.00MB mem-reservation=8.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=18.50MB mem-reservation=8.00MB thread-reservation=1
 |  max-parallelism=40 segment-costs=[367996439]
 |  23:SCAN HDFS [tpcds_partitioned_parquet_snap.store_sales sts, RANDOM]
 |     HDFS partitions=1824/1824 files=1824 size=199.33MB
@@ -689,7 +689,7 @@ PLAN-ROOT SINK
 |  |
 |  F10:PLAN FRAGMENT [HASH(cs.cs_item_sk)] hosts=10 instances=10 (adjusted from 120)
 |  Per-Instance Resources: mem-estimate=16.00MB mem-reservation=10.75MB thread-reservation=1
-|  max-parallelism=10 segment-costs=[1242311, 1212041, 754901] cpu-comparison-result=61 [max(10 (self) vs 61 (sum children))]
+|  max-parallelism=10 segment-costs=[1242311, 1212041, 754901] cpu-comparison-result=51 [max(10 (self) vs 51 (sum children))]
 |  18:SORT
 |  |  order by: (CAST(sum(coalesce(cr.cr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(coalesce(cs.cs_quantity, 0)) AS DECIMAL(15,4))) ASC
 |  |  materialized: (CAST(sum(coalesce(cr.cr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(coalesce(cs.cs_quantity, 0)) AS DECIMAL(15,4)))
@@ -705,17 +705,17 @@ PLAN-ROOT SINK
 |  |  in pipelines: 46(GETNEXT), 12(OPEN)
 |  |
 |  45:EXCHANGE [HASH(cs.cs_item_sk)]
-|  |  mem-estimate=2.88MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=2.33MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=11 row-size=52B cardinality=360.18K cost=126171
 |  |  in pipelines: 12(GETNEXT)
 |  |
-|  F08:PLAN FRAGMENT [HASH(cs.cs_item_sk,cs.cs_order_number)] hosts=10 instances=20 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=22.81MB mem-reservation=3.00MB thread-reservation=1
-|  max-parallelism=20 segment-costs=[165080728, 1391735] cpu-comparison-result=61 [max(40 (self) vs 61 (sum children))]
+|  F08:PLAN FRAGMENT [HASH(cs.cs_item_sk,cs.cs_order_number)] hosts=10 instances=10 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=22.81MB mem-reservation=5.00MB thread-reservation=1
+|  max-parallelism=20 segment-costs=[165080728, 1391735] cpu-comparison-result=51 [max(30 (self) vs 51 (sum children))]
 |  17:AGGREGATE [STREAMING]
 |  |  output: sum(CAST(coalesce(cr.cr_return_quantity, CAST(0 AS INT)) AS BIGINT)), sum(CAST(coalesce(cs.cs_quantity, CAST(0 AS INT)) AS BIGINT)), sum(coalesce(cr.cr_return_amount, CAST(0 AS DECIMAL(7,2)))), sum(coalesce(cs.cs_net_paid, CAST(0 AS DECIMAL(7,2))))
 |  |  group by: cs.cs_item_sk
-|  |  mem-estimate=10.00MB mem-reservation=3.00MB spill-buffer=128.00KB thread-reservation=0
+|  |  mem-estimate=10.00MB mem-reservation=5.00MB spill-buffer=256.00KB thread-reservation=0
 |  |  tuple-ids=11 row-size=52B cardinality=360.18K cost=62998536
 |  |  in pipelines: 12(GETNEXT)
 |  |
@@ -728,13 +728,13 @@ PLAN-ROOT SINK
 |  |  in pipelines: 12(GETNEXT), 14(OPEN)
 |  |
 |  |--F21:PLAN FRAGMENT [HASH(cs.cs_item_sk,cs.cs_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=4.89MB mem-reservation=4.88MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[248]
 |  |  JOIN BUILD
 |  |  |  join-table-id=02 plan-id=03 cohort-id=02
 |  |  |  build expressions: d_date_sk
 |  |  |  runtime filters: RF002[bloom] <- d_date_sk
-|  |  |  mem-estimate=3.88MB mem-reservation=3.88MB spill-buffer=64.00KB thread-reservation=0 cost=108
+|  |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=108
 |  |  |
 |  |  44:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -766,13 +766,13 @@ PLAN-ROOT SINK
 |  |  tuple-ids=8,9N row-size=48B cardinality=25.48M(filtered from 432.01M) cost=84815848
 |  |  in pipelines: 12(GETNEXT), 13(OPEN)
 |  |
-|  |--F22:PLAN FRAGMENT [HASH(cs.cs_item_sk,cs.cs_order_number)] hosts=10 instances=20 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=90.30MB mem-reservation=34.00MB thread-reservation=1
+|  |--F22:PLAN FRAGMENT [HASH(cs.cs_item_sk,cs.cs_order_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=169.90MB mem-reservation=34.00MB thread-reservation=1
 |  |  |  max-parallelism=20 segment-costs=[51975964]
 |  |  JOIN BUILD
 |  |  |  join-table-id=03 plan-id=04 cohort-id=02
 |  |  |  build expressions: cr.cr_item_sk, cr.cr_order_number
-|  |  |  mem-estimate=79.60MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=43201699
+|  |  |  mem-estimate=159.20MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=43201699
 |  |  |
 |  |  43:EXCHANGE [HASH(cr.cr_item_sk,cr.cr_order_number)]
 |  |  |  mem-estimate=10.70MB mem-reservation=0B thread-reservation=0
@@ -780,7 +780,7 @@ PLAN-ROOT SINK
 |  |  |  in pipelines: 13(GETNEXT)
 |  |  |
 |  |  F07:PLAN FRAGMENT [RANDOM] hosts=10 instances=30 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=17.88MB mem-reservation=32.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=16.94MB mem-reservation=32.00KB thread-reservation=1
 |  |  max-parallelism=30 segment-costs=[214461873]
 |  |  13:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_returns cr, RANDOM]
 |  |     HDFS partitions=2060/2060 files=2060 size=30.47MB
@@ -803,7 +803,7 @@ PLAN-ROOT SINK
 |  |
 |  F06:PLAN FRAGMENT [RANDOM] hosts=10 instances=20 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  Per-Instance Resources: mem-estimate=18.50MB mem-reservation=1.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=17.25MB mem-reservation=1.00MB thread-reservation=1
 |  max-parallelism=20 segment-costs=[183299469]
 |  12:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_sales cs, RANDOM]
 |     HDFS partitions=1831/1831 files=1831 size=150.82MB
@@ -988,11 +988,11 @@ max-parallelism=10 segment-costs=[91998437]
    tuple-ids=0 row-size=28B cardinality=12.79M(filtered from 216.00M) cost=62347759
    in pipelines: 01(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=370.03MB Threads=41
-Per-Host Resource Estimates: Memory=1.26GB
+Max Per-Host Resource Reservation: Memory=259.22MB Threads=35
+Per-Host Resource Estimates: Memory=1.13GB
 F18:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=52.64MB mem-reservation=22.50MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[2088323, 2088323, 2088323, 2818097, 1018681, 500] cpu-comparison-result=203 [max(1 (self) vs 203 (sum children))]
+|  max-parallelism=1 segment-costs=[2088323, 2088323, 2088323, 2818097, 1018681, 500] cpu-comparison-result=173 [max(1 (self) vs 173 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: channel, item, return_ratio, return_rank, currency_rank
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=500
@@ -1051,7 +1051,7 @@ PLAN-ROOT SINK
 |  |
 |  F16:PLAN FRAGMENT [HASH(sts.ss_item_sk)] hosts=10 instances=10 (adjusted from 120)
 |  Per-Instance Resources: mem-estimate=16.00MB mem-reservation=10.75MB thread-reservation=1
-|  max-parallelism=10 segment-costs=[1242311, 1212041, 754901] cpu-comparison-result=101 [max(10 (self) vs 101 (sum children))]
+|  max-parallelism=10 segment-costs=[1242311, 1212041, 754901] cpu-comparison-result=81 [max(10 (self) vs 81 (sum children))]
 |  29:SORT
 |  |  order by: (CAST(sum(coalesce(sr.sr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(coalesce(sts.ss_quantity, 0)) AS DECIMAL(15,4))) ASC
 |  |  materialized: (CAST(sum(coalesce(sr.sr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(coalesce(sts.ss_quantity, 0)) AS DECIMAL(15,4)))
@@ -1067,17 +1067,17 @@ PLAN-ROOT SINK
 |  |  in pipelines: 52(GETNEXT), 23(OPEN)
 |  |
 |  51:EXCHANGE [HASH(sts.ss_item_sk)]
-|  |  mem-estimate=3.97MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=2.88MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=19 row-size=52B cardinality=360.18K cost=126171
 |  |  in pipelines: 23(GETNEXT)
 |  |
-|  F14:PLAN FRAGMENT [HASH(sts.ss_item_sk,sts.ss_ticket_number)] hosts=10 instances=40 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=23.44MB mem-reservation=2.00MB thread-reservation=1
-|  max-parallelism=40 segment-costs=[308234156, 1391735] cpu-comparison-result=101 [max(80 (self) vs 101 (sum children))]
+|  F14:PLAN FRAGMENT [HASH(sts.ss_item_sk,sts.ss_ticket_number)] hosts=10 instances=20 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=23.44MB mem-reservation=3.00MB thread-reservation=1
+|  max-parallelism=40 segment-costs=[308234156, 1391735] cpu-comparison-result=81 [max(60 (self) vs 81 (sum children))]
 |  28:AGGREGATE [STREAMING]
 |  |  output: sum(CAST(coalesce(sr.sr_return_quantity, CAST(0 AS INT)) AS BIGINT)), sum(CAST(coalesce(sts.ss_quantity, CAST(0 AS INT)) AS BIGINT)), sum(coalesce(sr.sr_return_amt, CAST(0 AS DECIMAL(7,2)))), sum(coalesce(sts.ss_net_paid, CAST(0 AS DECIMAL(7,2))))
 |  |  group by: sts.ss_item_sk
-|  |  mem-estimate=10.00MB mem-reservation=2.00MB spill-buffer=64.00KB thread-reservation=0
+|  |  mem-estimate=10.00MB mem-reservation=3.00MB spill-buffer=128.00KB thread-reservation=0
 |  |  tuple-ids=19 row-size=52B cardinality=360.18K cost=103892301
 |  |  in pipelines: 23(GETNEXT)
 |  |
@@ -1090,13 +1090,13 @@ PLAN-ROOT SINK
 |  |  in pipelines: 23(GETNEXT), 25(OPEN)
 |  |
 |  |--F23:PLAN FRAGMENT [HASH(sts.ss_item_sk,sts.ss_ticket_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=8.77MB mem-reservation=8.75MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=4.89MB mem-reservation=4.88MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[248]
 |  |  JOIN BUILD
 |  |  |  join-table-id=04 plan-id=05 cohort-id=03
 |  |  |  build expressions: d_date_sk
 |  |  |  runtime filters: RF004[bloom] <- d_date_sk
-|  |  |  mem-estimate=7.75MB mem-reservation=7.75MB spill-buffer=64.00KB thread-reservation=0 cost=108
+|  |  |  mem-estimate=3.88MB mem-reservation=3.88MB spill-buffer=64.00KB thread-reservation=0 cost=108
 |  |  |
 |  |  50:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -1128,13 +1128,13 @@ PLAN-ROOT SINK
 |  |  tuple-ids=16,17N row-size=48B cardinality=51.16M(filtered from 863.99M) cost=169677527
 |  |  in pipelines: 23(GETNEXT), 24(OPEN)
 |  |
-|  |--F24:PLAN FRAGMENT [HASH(sts.ss_item_sk,sts.ss_ticket_number)] hosts=10 instances=40 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=90.77MB mem-reservation=34.00MB thread-reservation=1
+|  |--F24:PLAN FRAGMENT [HASH(sts.ss_item_sk,sts.ss_ticket_number)] hosts=10 instances=20 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=170.37MB mem-reservation=34.00MB thread-reservation=1
 |  |  |  max-parallelism=40 segment-costs=[103946472]
 |  |  JOIN BUILD
 |  |  |  join-table-id=05 plan-id=06 cohort-id=03
 |  |  |  build expressions: sr.sr_item_sk, sr.sr_ticket_number
-|  |  |  mem-estimate=79.60MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=86398863
+|  |  |  mem-estimate=159.20MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=86398863
 |  |  |
 |  |  49:EXCHANGE [HASH(sr.sr_item_sk,sr.sr_ticket_number)]
 |  |  |  mem-estimate=11.17MB mem-reservation=0B thread-reservation=0
@@ -1142,7 +1142,7 @@ PLAN-ROOT SINK
 |  |  |  in pipelines: 24(GETNEXT)
 |  |  |
 |  |  F13:PLAN FRAGMENT [RANDOM] hosts=10 instances=50 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=19.75MB mem-reservation=512.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=17.88MB mem-reservation=512.00KB thread-reservation=1
 |  |  max-parallelism=50 segment-costs=[428901235]
 |  |  24:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns sr, RANDOM]
 |  |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -1165,7 +1165,7 @@ PLAN-ROOT SINK
 |  |
 |  F12:PLAN FRAGMENT [RANDOM] hosts=10 instances=40 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  Per-Instance Resources: mem-estimate=21.00MB mem-reservation=8.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=18.50MB mem-reservation=8.00MB thread-reservation=1
 |  max-parallelism=40 segment-costs=[367996439]
 |  23:SCAN HDFS [tpcds_partitioned_parquet_snap.store_sales sts, RANDOM]
 |     HDFS partitions=1824/1824 files=1824 size=199.33MB
@@ -1219,7 +1219,7 @@ PLAN-ROOT SINK
 |  |
 |  F10:PLAN FRAGMENT [HASH(cs.cs_item_sk)] hosts=10 instances=10 (adjusted from 120)
 |  Per-Instance Resources: mem-estimate=16.00MB mem-reservation=10.75MB thread-reservation=1
-|  max-parallelism=10 segment-costs=[1242311, 1212041, 754901] cpu-comparison-result=61 [max(10 (self) vs 61 (sum children))]
+|  max-parallelism=10 segment-costs=[1242311, 1212041, 754901] cpu-comparison-result=51 [max(10 (self) vs 51 (sum children))]
 |  18:SORT
 |  |  order by: (CAST(sum(coalesce(cr.cr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(coalesce(cs.cs_quantity, 0)) AS DECIMAL(15,4))) ASC
 |  |  materialized: (CAST(sum(coalesce(cr.cr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(coalesce(cs.cs_quantity, 0)) AS DECIMAL(15,4)))
@@ -1235,17 +1235,17 @@ PLAN-ROOT SINK
 |  |  in pipelines: 46(GETNEXT), 12(OPEN)
 |  |
 |  45:EXCHANGE [HASH(cs.cs_item_sk)]
-|  |  mem-estimate=2.88MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=2.33MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=11 row-size=52B cardinality=360.18K cost=126171
 |  |  in pipelines: 12(GETNEXT)
 |  |
-|  F08:PLAN FRAGMENT [HASH(cs.cs_item_sk,cs.cs_order_number)] hosts=10 instances=20 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=22.81MB mem-reservation=3.00MB thread-reservation=1
-|  max-parallelism=20 segment-costs=[165080728, 1391735] cpu-comparison-result=61 [max(40 (self) vs 61 (sum children))]
+|  F08:PLAN FRAGMENT [HASH(cs.cs_item_sk,cs.cs_order_number)] hosts=10 instances=10 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=22.81MB mem-reservation=5.00MB thread-reservation=1
+|  max-parallelism=20 segment-costs=[165080728, 1391735] cpu-comparison-result=51 [max(30 (self) vs 51 (sum children))]
 |  17:AGGREGATE [STREAMING]
 |  |  output: sum(CAST(coalesce(cr.cr_return_quantity, CAST(0 AS INT)) AS BIGINT)), sum(CAST(coalesce(cs.cs_quantity, CAST(0 AS INT)) AS BIGINT)), sum(coalesce(cr.cr_return_amount, CAST(0 AS DECIMAL(7,2)))), sum(coalesce(cs.cs_net_paid, CAST(0 AS DECIMAL(7,2))))
 |  |  group by: cs.cs_item_sk
-|  |  mem-estimate=10.00MB mem-reservation=3.00MB spill-buffer=128.00KB thread-reservation=0
+|  |  mem-estimate=10.00MB mem-reservation=5.00MB spill-buffer=256.00KB thread-reservation=0
 |  |  tuple-ids=11 row-size=52B cardinality=360.18K cost=62998536
 |  |  in pipelines: 12(GETNEXT)
 |  |
@@ -1258,13 +1258,13 @@ PLAN-ROOT SINK
 |  |  in pipelines: 12(GETNEXT), 14(OPEN)
 |  |
 |  |--F21:PLAN FRAGMENT [HASH(cs.cs_item_sk,cs.cs_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=4.89MB mem-reservation=4.88MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[248]
 |  |  JOIN BUILD
 |  |  |  join-table-id=02 plan-id=03 cohort-id=02
 |  |  |  build expressions: d_date_sk
 |  |  |  runtime filters: RF002[bloom] <- d_date_sk
-|  |  |  mem-estimate=3.88MB mem-reservation=3.88MB spill-buffer=64.00KB thread-reservation=0 cost=108
+|  |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=108
 |  |  |
 |  |  44:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -1296,13 +1296,13 @@ PLAN-ROOT SINK
 |  |  tuple-ids=8,9N row-size=48B cardinality=25.48M(filtered from 432.01M) cost=84815848
 |  |  in pipelines: 12(GETNEXT), 13(OPEN)
 |  |
-|  |--F22:PLAN FRAGMENT [HASH(cs.cs_item_sk,cs.cs_order_number)] hosts=10 instances=20 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=90.30MB mem-reservation=34.00MB thread-reservation=1
+|  |--F22:PLAN FRAGMENT [HASH(cs.cs_item_sk,cs.cs_order_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=169.90MB mem-reservation=34.00MB thread-reservation=1
 |  |  |  max-parallelism=20 segment-costs=[51975964]
 |  |  JOIN BUILD
 |  |  |  join-table-id=03 plan-id=04 cohort-id=02
 |  |  |  build expressions: cr.cr_item_sk, cr.cr_order_number
-|  |  |  mem-estimate=79.60MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=43201699
+|  |  |  mem-estimate=159.20MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=43201699
 |  |  |
 |  |  43:EXCHANGE [HASH(cr.cr_item_sk,cr.cr_order_number)]
 |  |  |  mem-estimate=10.70MB mem-reservation=0B thread-reservation=0
@@ -1310,7 +1310,7 @@ PLAN-ROOT SINK
 |  |  |  in pipelines: 13(GETNEXT)
 |  |  |
 |  |  F07:PLAN FRAGMENT [RANDOM] hosts=10 instances=30 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=17.88MB mem-reservation=32.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=16.94MB mem-reservation=32.00KB thread-reservation=1
 |  |  max-parallelism=30 segment-costs=[214461873]
 |  |  13:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_returns cr, RANDOM]
 |  |     HDFS partitions=2060/2060 files=2060 size=30.47MB
@@ -1333,7 +1333,7 @@ PLAN-ROOT SINK
 |  |
 |  F06:PLAN FRAGMENT [RANDOM] hosts=10 instances=20 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  Per-Instance Resources: mem-estimate=18.50MB mem-reservation=1.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=17.25MB mem-reservation=1.00MB thread-reservation=1
 |  max-parallelism=20 segment-costs=[183299469]
 |  12:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_sales cs, RANDOM]
 |     HDFS partitions=1831/1831 files=1831 size=150.82MB
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q50.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q50.test
index bf9422ea8..dafca63be 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q50.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q50.test
@@ -170,11 +170,11 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=24B cardinality=8.64G cost=2985961602
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=1.80GB Threads=67
-Per-Host Resource Estimates: Memory=18.12GB
+Max Per-Host Resource Reservation: Memory=1.07GB Threads=52
+Per-Host Resource Estimates: Memory=13.15GB
 F07:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Instance Resources: mem-estimate=6.45MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[1567] cpu-comparison-result=273 [max(1 (self) vs 273 (sum children))]
+|  Per-Instance Resources: mem-estimate=5.84MB mem-reservation=4.00MB thread-reservation=1
+|  max-parallelism=1 segment-costs=[1567] cpu-comparison-result=213 [max(1 (self) vs 213 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: s_store_name, s_company_id, s_street_number, s_street_name, s_street_type, s_suite_number, s_city, s_county, s_state, s_zip, sum(CASE WHEN (sr_returned_date_sk - ss_sold_date_sk <= 30) THEN 1 ELSE 0 END), sum(CASE WHEN (sr_returned_date_sk - ss_sold_date_sk > 30) AND (sr_returned_date_sk - ss_sold_date_sk <= 60) THEN 1 ELSE 0 END), sum(CASE WHEN (sr_returned_date_sk - ss_sold_date_sk > 60) AND (sr_returned_date_sk - ss_sold_date_sk <= 90) THEN 1 ELSE 0 END), sum(CASE WHE [...]
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=1500
@@ -182,13 +182,13 @@ PLAN-ROOT SINK
 18:MERGING-EXCHANGE [UNPARTITIONED]
 |  order by: s_store_name ASC, s_company_id ASC, s_street_number ASC, s_street_name ASC, s_street_type ASC, s_suite_number ASC, s_city ASC, s_county ASC, s_state ASC, s_zip ASC
 |  limit: 100
-|  mem-estimate=2.45MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=1.84MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=6 row-size=210B cardinality=100 cost=67
 |  in pipelines: 10(GETNEXT)
 |
-F06:PLAN FRAGMENT [HASH(s_store_name,s_company_id,s_street_number,s_street_name,s_street_type,s_suite_number,s_city,s_county,s_state,s_zip)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=547.14MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=520 segment-costs=[2346816618, 5153509026, 580] cpu-comparison-result=273 [max(120 (self) vs 273 (sum children))]
+F06:PLAN FRAGMENT [HASH(s_store_name,s_company_id,s_street_number,s_street_name,s_street_type,s_suite_number,s_city,s_county,s_state,s_zip)] hosts=10 instances=90 (adjusted from 120)
+Per-Instance Resources: mem-estimate=535.00MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=520 segment-costs=[2346816618, 5153509026, 580] cpu-comparison-result=213 [max(90 (self) vs 213 (sum children))]
 10:TOP-N [LIMIT=100]
 |  order by: s_store_name ASC, s_company_id ASC, s_street_number ASC, s_street_name ASC, s_street_type ASC, s_suite_number ASC, s_city ASC, s_county ASC, s_state ASC, s_zip ASC
 |  mem-estimate=20.47KB mem-reservation=0B thread-reservation=0
@@ -198,22 +198,22 @@ max-parallelism=520 segment-costs=[2346816618, 5153509026, 580] cpu-comparison-r
 17:AGGREGATE [FINALIZE]
 |  output: sum:merge(CASE WHEN (sr_returned_date_sk - ss_sold_date_sk <= 30) THEN 1 ELSE 0 END), sum:merge(CASE WHEN (sr_returned_date_sk - ss_sold_date_sk > 30) AND (sr_returned_date_sk - ss_sold_date_sk <= 60) THEN 1 ELSE 0 END), sum:merge(CASE WHEN (sr_returned_date_sk - ss_sold_date_sk > 60) AND (sr_returned_date_sk - ss_sold_date_sk <= 90) THEN 1 ELSE 0 END), sum:merge(CASE WHEN (sr_returned_date_sk - ss_sold_date_sk > 90) AND (sr_returned_date_sk - ss_sold_date_sk <= 120) THEN 1 EL [...]
 |  group by: s_store_name, s_company_id, s_street_number, s_street_name, s_street_type, s_suite_number, s_city, s_county, s_state, s_zip
-|  mem-estimate=512.11MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=512.48MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=5 row-size=210B cardinality=323.35M cost=1999152520
 |  in pipelines: 17(GETNEXT), 00(OPEN)
 |
 16:EXCHANGE [HASH(s_store_name,s_company_id,s_street_number,s_street_name,s_street_type,s_suite_number,s_city,s_county,s_state,s_zip)]
-|  mem-estimate=35.03MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=22.51MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=5 row-size=210B cardinality=323.35M cost=347664098
 |  in pipelines: 00(GETNEXT)
 |
-F02:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=540.46MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result=273 [max(240 (self) vs 273 (sum children))]
+F02:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=60 (adjusted from 120)
+Per-Instance Resources: mem-estimate=601.04MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result=213 [max(180 (self) vs 213 (sum children))]
 09:AGGREGATE [STREAMING]
 |  output: sum(CAST(CASE WHEN (CAST(sr_returned_date_sk AS BIGINT) - CAST(ss_sold_date_sk AS BIGINT) <= CAST(30 AS BIGINT)) THEN CAST(1 AS TINYINT) ELSE CAST(0 AS TINYINT) END AS BIGINT)), sum(CAST(CASE WHEN (CAST(sr_returned_date_sk AS BIGINT) - CAST(ss_sold_date_sk AS BIGINT) > CAST(30 AS BIGINT)) AND (CAST(sr_returned_date_sk AS BIGINT) - CAST(ss_sold_date_sk AS BIGINT) <= CAST(60 AS BIGINT)) THEN CAST(1 AS TINYINT) ELSE CAST(0 AS TINYINT) END AS BIGINT)), sum(CAST(CASE WHEN (CAST(sr_ [...]
 |  group by: s_store_name, s_company_id, s_street_number, s_street_name, s_street_type, s_suite_number, s_city, s_county, s_state, s_zip
-|  mem-estimate=427.07MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=512.67MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=5 row-size=210B cardinality=323.35M cost=1999152520
 |  in pipelines: 00(GETNEXT)
 |
@@ -226,13 +226,13 @@ max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result
 |  in pipelines: 00(GETNEXT), 03(OPEN)
 |
 |--F08:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=35.79MB mem-reservation=35.50MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=18.54MB mem-reservation=18.25MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[170129]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: d1.d_date_sk
 |  |  runtime filters: RF000[bloom] <- d1.d_date_sk
-|  |  mem-estimate=34.50MB mem-reservation=34.50MB spill-buffer=128.00KB thread-reservation=0 cost=73049
+|  |  mem-estimate=17.25MB mem-reservation=17.25MB spill-buffer=128.00KB thread-reservation=0 cost=73049
 |  |
 |  15:EXCHANGE [BROADCAST]
 |  |  mem-estimate=293.35KB mem-reservation=0B thread-reservation=0
@@ -261,13 +261,13 @@ max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result
 |  in pipelines: 00(GETNEXT), 02(OPEN)
 |
 |--F09:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=24.65MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=13.02MB mem-reservation=12.62MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[3140]
 |  JOIN BUILD
 |  |  join-table-id=01 plan-id=02 cohort-id=01
 |  |  build expressions: s_store_sk
 |  |  runtime filters: RF002[bloom] <- s_store_sk, RF003[min_max] <- s_store_sk
-|  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=1350
+|  |  mem-estimate=11.62MB mem-reservation=11.62MB spill-buffer=64.00KB thread-reservation=0 cost=1350
 |  |
 |  14:EXCHANGE [BROADCAST]
 |  |  mem-estimate=406.43KB mem-reservation=0B thread-reservation=0
@@ -296,13 +296,13 @@ max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result
 |  in pipelines: 00(GETNEXT), 04(OPEN)
 |
 |--F10:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=24.27MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=12.64MB mem-reservation=12.62MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[248]
 |  JOIN BUILD
 |  |  join-table-id=02 plan-id=03 cohort-id=01
 |  |  build expressions: d2.d_date_sk
 |  |  runtime filters: RF004[bloom] <- d2.d_date_sk
-|  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=108
+|  |  mem-estimate=11.62MB mem-reservation=11.62MB spill-buffer=64.00KB thread-reservation=0 cost=108
 |  |
 |  13:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -333,14 +333,14 @@ max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result
 |  tuple-ids=0,1 row-size=44B cardinality=6.00G cost=3303337093
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
-|--F11:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  |  Per-Instance Resources: mem-estimate=387.94MB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
+|--F11:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=60 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=730.07MB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
 |  |  max-parallelism=910 segment-costs=[1039464723]
 |  JOIN BUILD
 |  |  join-table-id=03 plan-id=04 cohort-id=01
 |  |  build expressions: sr_customer_sk, sr_item_sk, sr_ticket_number
 |  |  runtime filters: RF006[bloom] <- sr_customer_sk, RF007[bloom] <- sr_item_sk, RF008[bloom] <- sr_ticket_number, RF009[min_max] <- sr_customer_sk, RF010[min_max] <- sr_item_sk, RF011[min_max] <- sr_ticket_number
-|  |  mem-estimate=342.13MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
+|  |  mem-estimate=684.25MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
 |  |
 |  12:EXCHANGE [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)]
 |  |  mem-estimate=12.81MB mem-reservation=0B thread-reservation=0
@@ -349,7 +349,7 @@ max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  Per-Instance Resources: mem-estimate=27.25MB mem-reservation=512.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=21.62MB mem-reservation=512.00KB thread-reservation=1
 |  max-parallelism=190 segment-costs=[1806773027]
 |  01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -370,7 +370,7 @@ max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 Per-Host Shared Resources: mem-estimate=35.00MB mem-reservation=35.00MB thread-reservation=0 runtime-filters-memory=35.00MB
-Per-Instance Resources: mem-estimate=29.12MB mem-reservation=8.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=22.56MB mem-reservation=8.00MB thread-reservation=1
 max-parallelism=1824 segment-costs=[20791140047]
 00:SCAN HDFS [tpcds_partitioned_parquet_snap.store_sales, RANDOM]
    HDFS partitions=1824/1824 files=1824 size=199.33MB
@@ -384,11 +384,11 @@ max-parallelism=1824 segment-costs=[20791140047]
    tuple-ids=0 row-size=24B cardinality=8.64G cost=2985961602
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=1.80GB Threads=67
-Per-Host Resource Estimates: Memory=18.12GB
+Max Per-Host Resource Reservation: Memory=1.07GB Threads=52
+Per-Host Resource Estimates: Memory=13.15GB
 F07:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Instance Resources: mem-estimate=6.45MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[1567] cpu-comparison-result=273 [max(1 (self) vs 273 (sum children))]
+|  Per-Instance Resources: mem-estimate=5.84MB mem-reservation=4.00MB thread-reservation=1
+|  max-parallelism=1 segment-costs=[1567] cpu-comparison-result=213 [max(1 (self) vs 213 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: s_store_name, s_company_id, s_street_number, s_street_name, s_street_type, s_suite_number, s_city, s_county, s_state, s_zip, sum(CASE WHEN (sr_returned_date_sk - ss_sold_date_sk <= 30) THEN 1 ELSE 0 END), sum(CASE WHEN (sr_returned_date_sk - ss_sold_date_sk > 30) AND (sr_returned_date_sk - ss_sold_date_sk <= 60) THEN 1 ELSE 0 END), sum(CASE WHEN (sr_returned_date_sk - ss_sold_date_sk > 60) AND (sr_returned_date_sk - ss_sold_date_sk <= 90) THEN 1 ELSE 0 END), sum(CASE WHE [...]
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=1500
@@ -396,13 +396,13 @@ PLAN-ROOT SINK
 18:MERGING-EXCHANGE [UNPARTITIONED]
 |  order by: s_store_name ASC, s_company_id ASC, s_street_number ASC, s_street_name ASC, s_street_type ASC, s_suite_number ASC, s_city ASC, s_county ASC, s_state ASC, s_zip ASC
 |  limit: 100
-|  mem-estimate=2.45MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=1.84MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=6 row-size=210B cardinality=100 cost=67
 |  in pipelines: 10(GETNEXT)
 |
-F06:PLAN FRAGMENT [HASH(s_store_name,s_company_id,s_street_number,s_street_name,s_street_type,s_suite_number,s_city,s_county,s_state,s_zip)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=547.14MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=520 segment-costs=[2346816618, 5153509026, 580] cpu-comparison-result=273 [max(120 (self) vs 273 (sum children))]
+F06:PLAN FRAGMENT [HASH(s_store_name,s_company_id,s_street_number,s_street_name,s_street_type,s_suite_number,s_city,s_county,s_state,s_zip)] hosts=10 instances=90 (adjusted from 120)
+Per-Instance Resources: mem-estimate=535.00MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=520 segment-costs=[2346816618, 5153509026, 580] cpu-comparison-result=213 [max(90 (self) vs 213 (sum children))]
 10:TOP-N [LIMIT=100]
 |  order by: s_store_name ASC, s_company_id ASC, s_street_number ASC, s_street_name ASC, s_street_type ASC, s_suite_number ASC, s_city ASC, s_county ASC, s_state ASC, s_zip ASC
 |  mem-estimate=20.47KB mem-reservation=0B thread-reservation=0
@@ -412,22 +412,22 @@ max-parallelism=520 segment-costs=[2346816618, 5153509026, 580] cpu-comparison-r
 17:AGGREGATE [FINALIZE]
 |  output: sum:merge(CASE WHEN (sr_returned_date_sk - ss_sold_date_sk <= 30) THEN 1 ELSE 0 END), sum:merge(CASE WHEN (sr_returned_date_sk - ss_sold_date_sk > 30) AND (sr_returned_date_sk - ss_sold_date_sk <= 60) THEN 1 ELSE 0 END), sum:merge(CASE WHEN (sr_returned_date_sk - ss_sold_date_sk > 60) AND (sr_returned_date_sk - ss_sold_date_sk <= 90) THEN 1 ELSE 0 END), sum:merge(CASE WHEN (sr_returned_date_sk - ss_sold_date_sk > 90) AND (sr_returned_date_sk - ss_sold_date_sk <= 120) THEN 1 EL [...]
 |  group by: s_store_name, s_company_id, s_street_number, s_street_name, s_street_type, s_suite_number, s_city, s_county, s_state, s_zip
-|  mem-estimate=512.11MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=512.48MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=5 row-size=210B cardinality=323.35M cost=1999152520
 |  in pipelines: 17(GETNEXT), 00(OPEN)
 |
 16:EXCHANGE [HASH(s_store_name,s_company_id,s_street_number,s_street_name,s_street_type,s_suite_number,s_city,s_county,s_state,s_zip)]
-|  mem-estimate=35.03MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=22.51MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=5 row-size=210B cardinality=323.35M cost=347664098
 |  in pipelines: 00(GETNEXT)
 |
-F02:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=540.46MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result=273 [max(240 (self) vs 273 (sum children))]
+F02:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=60 (adjusted from 120)
+Per-Instance Resources: mem-estimate=601.04MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result=213 [max(180 (self) vs 213 (sum children))]
 09:AGGREGATE [STREAMING]
 |  output: sum(CAST(CASE WHEN (CAST(sr_returned_date_sk AS BIGINT) - CAST(ss_sold_date_sk AS BIGINT) <= CAST(30 AS BIGINT)) THEN CAST(1 AS TINYINT) ELSE CAST(0 AS TINYINT) END AS BIGINT)), sum(CAST(CASE WHEN (CAST(sr_returned_date_sk AS BIGINT) - CAST(ss_sold_date_sk AS BIGINT) > CAST(30 AS BIGINT)) AND (CAST(sr_returned_date_sk AS BIGINT) - CAST(ss_sold_date_sk AS BIGINT) <= CAST(60 AS BIGINT)) THEN CAST(1 AS TINYINT) ELSE CAST(0 AS TINYINT) END AS BIGINT)), sum(CAST(CASE WHEN (CAST(sr_ [...]
 |  group by: s_store_name, s_company_id, s_street_number, s_street_name, s_street_type, s_suite_number, s_city, s_county, s_state, s_zip
-|  mem-estimate=427.07MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=512.67MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=5 row-size=210B cardinality=323.35M cost=1999152520
 |  in pipelines: 00(GETNEXT)
 |
@@ -440,13 +440,13 @@ max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result
 |  in pipelines: 00(GETNEXT), 03(OPEN)
 |
 |--F08:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=35.79MB mem-reservation=35.50MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=18.54MB mem-reservation=18.25MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[170129]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: d1.d_date_sk
 |  |  runtime filters: RF000[bloom] <- d1.d_date_sk
-|  |  mem-estimate=34.50MB mem-reservation=34.50MB spill-buffer=128.00KB thread-reservation=0 cost=73049
+|  |  mem-estimate=17.25MB mem-reservation=17.25MB spill-buffer=128.00KB thread-reservation=0 cost=73049
 |  |
 |  15:EXCHANGE [BROADCAST]
 |  |  mem-estimate=293.35KB mem-reservation=0B thread-reservation=0
@@ -475,13 +475,13 @@ max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result
 |  in pipelines: 00(GETNEXT), 02(OPEN)
 |
 |--F09:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=24.65MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=13.02MB mem-reservation=12.62MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[3140]
 |  JOIN BUILD
 |  |  join-table-id=01 plan-id=02 cohort-id=01
 |  |  build expressions: s_store_sk
 |  |  runtime filters: RF002[bloom] <- s_store_sk, RF003[min_max] <- s_store_sk
-|  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=1350
+|  |  mem-estimate=11.62MB mem-reservation=11.62MB spill-buffer=64.00KB thread-reservation=0 cost=1350
 |  |
 |  14:EXCHANGE [BROADCAST]
 |  |  mem-estimate=406.43KB mem-reservation=0B thread-reservation=0
@@ -510,13 +510,13 @@ max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result
 |  in pipelines: 00(GETNEXT), 04(OPEN)
 |
 |--F10:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=24.27MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=12.64MB mem-reservation=12.62MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[248]
 |  JOIN BUILD
 |  |  join-table-id=02 plan-id=03 cohort-id=01
 |  |  build expressions: d2.d_date_sk
 |  |  runtime filters: RF004[bloom] <- d2.d_date_sk
-|  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=108
+|  |  mem-estimate=11.62MB mem-reservation=11.62MB spill-buffer=64.00KB thread-reservation=0 cost=108
 |  |
 |  13:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -547,14 +547,14 @@ max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result
 |  tuple-ids=0,1 row-size=44B cardinality=6.00G cost=3303337093
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
-|--F11:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  |  Per-Instance Resources: mem-estimate=387.94MB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
+|--F11:PLAN FRAGMENT [HASH(ss_customer_sk,ss_item_sk,ss_ticket_number)] hosts=10 instances=60 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=730.07MB mem-reservation=67.00MB thread-reservation=1 runtime-filters-memory=33.00MB
 |  |  max-parallelism=910 segment-costs=[1039464723]
 |  JOIN BUILD
 |  |  join-table-id=03 plan-id=04 cohort-id=01
 |  |  build expressions: sr_customer_sk, sr_item_sk, sr_ticket_number
 |  |  runtime filters: RF006[bloom] <- sr_customer_sk, RF007[bloom] <- sr_item_sk, RF008[bloom] <- sr_ticket_number, RF009[min_max] <- sr_customer_sk, RF010[min_max] <- sr_item_sk, RF011[min_max] <- sr_ticket_number
-|  |  mem-estimate=342.13MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
+|  |  mem-estimate=684.25MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
 |  |
 |  12:EXCHANGE [HASH(sr_customer_sk,sr_item_sk,sr_ticket_number)]
 |  |  mem-estimate=12.81MB mem-reservation=0B thread-reservation=0
@@ -563,7 +563,7 @@ max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  Per-Instance Resources: mem-estimate=27.25MB mem-reservation=512.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=21.62MB mem-reservation=512.00KB thread-reservation=1
 |  max-parallelism=190 segment-costs=[1806773027]
 |  01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -584,7 +584,7 @@ max-parallelism=910 segment-costs=[9096879477, 4530947220] cpu-comparison-result
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 Per-Host Shared Resources: mem-estimate=35.00MB mem-reservation=35.00MB thread-reservation=0 runtime-filters-memory=35.00MB
-Per-Instance Resources: mem-estimate=29.12MB mem-reservation=8.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=22.56MB mem-reservation=8.00MB thread-reservation=1
 max-parallelism=1824 segment-costs=[20791140047]
 00:SCAN HDFS [tpcds_partitioned_parquet_snap.store_sales, RANDOM]
    HDFS partitions=1824/1824 files=1824 size=199.33MB
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q51.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q51.test
index 15a8dba1c..7e8559f54 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q51.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q51.test
@@ -202,10 +202,10 @@ PLAN-ROOT SINK
    tuple-ids=5 row-size=12B cardinality=8.64G cost=1735762980
    in pipelines: 06(GETNEXT)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=2.49GB Threads=89
+Max Per-Host Resource Reservation: Memory=2.47GB Threads=87
 Per-Host Resource Estimates: Memory=377.07TB
 F08:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Instance Resources: mem-estimate=4.87MB mem-reservation=4.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=4.73MB mem-reservation=4.00MB thread-reservation=1
 |  max-parallelism=1 segment-costs=[639] cpu-comparison-result=240 [max(1 (self) vs 240 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: item_sk, d_date, web_sales, store_sales, web_cumulative, store_cumulative
@@ -214,13 +214,13 @@ PLAN-ROOT SINK
 26:MERGING-EXCHANGE [UNPARTITIONED]
 |  order by: item_sk ASC, d_date ASC
 |  limit: 100
-|  mem-estimate=891.33KB mem-reservation=0B thread-reservation=0
+|  mem-estimate=742.89KB mem-reservation=0B thread-reservation=0
 |  tuple-ids=13 row-size=72B cardinality=100 cost=39
 |  in pipelines: 16(GETNEXT)
 |
-F07:PLAN FRAGMENT [HASH(CASE WHEN ws_item_sk IS NOT NULL THEN ws_item_sk ELSE ss_item_sk END)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=31.42TB mem-reservation=10.00MB thread-reservation=1
-max-parallelism=27882060 segment-costs=[231945815232544, 278820518032917, 220] cpu-comparison-result=240 [max(240 (self) vs 240 (sum children))]
+F07:PLAN FRAGMENT [HASH(CASE WHEN ws_item_sk IS NOT NULL THEN ws_item_sk ELSE ss_item_sk END)] hosts=10 instances=100 (adjusted from 120)
+Per-Instance Resources: mem-estimate=37.70TB mem-reservation=10.00MB thread-reservation=1
+max-parallelism=27882060 segment-costs=[231945815232544, 278820518032917, 220] cpu-comparison-result=240 [max(220 (self) vs 240 (sum children))]
 16:TOP-N [LIMIT=100]
 |  order by: item_sk ASC, d_date ASC
 |  mem-estimate=7.03KB mem-reservation=0B thread-reservation=0
@@ -244,7 +244,7 @@ max-parallelism=27882060 segment-costs=[231945815232544, 278820518032917, 220] c
 |
 13:SORT
 |  order by: CASE WHEN ws_item_sk IS NOT NULL THEN ws_item_sk ELSE ss_item_sk END ASC NULLS LAST, CASE WHEN d_date IS NOT NULL THEN d_date ELSE d_date END ASC
-|  mem-estimate=31.42TB mem-reservation=6.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=37.70TB mem-reservation=6.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=25 row-size=80B cardinality=51.81T cost=201402086378006
 |  in pipelines: 13(GETNEXT), 10(OPEN)
 |
@@ -254,7 +254,7 @@ max-parallelism=27882060 segment-costs=[231945815232544, 278820518032917, 220] c
 |  in pipelines: 10(GETNEXT)
 |
 F06:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=60.62MB mem-reservation=0B thread-reservation=1
+Per-Instance Resources: mem-estimate=53.12MB mem-reservation=0B thread-reservation=1
 max-parallelism=38311000 segment-costs=[383109971185632]
 12:HASH JOIN [FULL OUTER JOIN, PARTITIONED]
 |  hash-table-id=00
@@ -468,10 +468,10 @@ max-parallelism=1824 segment-costs=[56515544083, 17805178445] cpu-comparison-res
    tuple-ids=5 row-size=12B cardinality=8.64G cost=1735762980
    in pipelines: 06(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=2.49GB Threads=89
+Max Per-Host Resource Reservation: Memory=2.47GB Threads=87
 Per-Host Resource Estimates: Memory=377.07TB
 F08:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Instance Resources: mem-estimate=4.87MB mem-reservation=4.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=4.73MB mem-reservation=4.00MB thread-reservation=1
 |  max-parallelism=1 segment-costs=[639] cpu-comparison-result=240 [max(1 (self) vs 240 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: item_sk, d_date, web_sales, store_sales, web_cumulative, store_cumulative
@@ -480,13 +480,13 @@ PLAN-ROOT SINK
 26:MERGING-EXCHANGE [UNPARTITIONED]
 |  order by: item_sk ASC, d_date ASC
 |  limit: 100
-|  mem-estimate=891.33KB mem-reservation=0B thread-reservation=0
+|  mem-estimate=742.89KB mem-reservation=0B thread-reservation=0
 |  tuple-ids=13 row-size=72B cardinality=100 cost=39
 |  in pipelines: 16(GETNEXT)
 |
-F07:PLAN FRAGMENT [HASH(CASE WHEN ws_item_sk IS NOT NULL THEN ws_item_sk ELSE ss_item_sk END)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=31.42TB mem-reservation=10.00MB thread-reservation=1
-max-parallelism=27882060 segment-costs=[231945815232544, 278820518032917, 220] cpu-comparison-result=240 [max(240 (self) vs 240 (sum children))]
+F07:PLAN FRAGMENT [HASH(CASE WHEN ws_item_sk IS NOT NULL THEN ws_item_sk ELSE ss_item_sk END)] hosts=10 instances=100 (adjusted from 120)
+Per-Instance Resources: mem-estimate=37.70TB mem-reservation=10.00MB thread-reservation=1
+max-parallelism=27882060 segment-costs=[231945815232544, 278820518032917, 220] cpu-comparison-result=240 [max(220 (self) vs 240 (sum children))]
 16:TOP-N [LIMIT=100]
 |  order by: item_sk ASC, d_date ASC
 |  mem-estimate=7.03KB mem-reservation=0B thread-reservation=0
@@ -510,7 +510,7 @@ max-parallelism=27882060 segment-costs=[231945815232544, 278820518032917, 220] c
 |
 13:SORT
 |  order by: CASE WHEN ws_item_sk IS NOT NULL THEN ws_item_sk ELSE ss_item_sk END ASC NULLS LAST, CASE WHEN d_date IS NOT NULL THEN d_date ELSE d_date END ASC
-|  mem-estimate=31.42TB mem-reservation=6.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=37.70TB mem-reservation=6.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=25 row-size=80B cardinality=51.81T cost=201402086378006
 |  in pipelines: 13(GETNEXT), 10(OPEN)
 |
@@ -520,7 +520,7 @@ max-parallelism=27882060 segment-costs=[231945815232544, 278820518032917, 220] c
 |  in pipelines: 10(GETNEXT)
 |
 F06:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=60.62MB mem-reservation=0B thread-reservation=1
+Per-Instance Resources: mem-estimate=53.12MB mem-reservation=0B thread-reservation=1
 max-parallelism=38311000 segment-costs=[383109971185632]
 12:HASH JOIN [FULL OUTER JOIN, PARTITIONED]
 |  hash-table-id=00
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q64.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q64.test
index c36e8481b..86d67849b 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q64.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q64.test
@@ -881,27 +881,27 @@ PLAN-ROOT SINK
    tuple-ids=1 row-size=12B cardinality=64.75M(filtered from 863.99M) cost=149297235
    in pipelines: 01(GETNEXT)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=6.54GB Threads=339
-Per-Host Resource Estimates: Memory=102.75GB
+Max Per-Host Resource Reservation: Memory=6.10GB Threads=325
+Per-Host Resource Estimates: Memory=101.02GB
 F53:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Instance Resources: mem-estimate=1.31GB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[18941077893] cpu-comparison-result=1576 [max(1 (self) vs 1576 (sum children))]
+|  Per-Instance Resources: mem-estimate=1.21GB mem-reservation=4.00MB thread-reservation=1
+|  max-parallelism=1 segment-costs=[18941077893] cpu-comparison-result=1516 [max(1 (self) vs 1516 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: product_name, store_name, store_zip, b_street_number, b_street_name, b_city, b_zip, c_street_number, c_street_name, c_city, c_zip, syear, cnt, s1, s2, s3, s1, s2, s3, syear, cnt
 |  mem-estimate=100.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=18143864832
 |
 136:MERGING-EXCHANGE [UNPARTITIONED]
 |  order by: product_name ASC, store_name ASC, cnt ASC, s1 ASC, s1 ASC
-|  mem-estimate=1.21GB mem-reservation=0B thread-reservation=0
+|  mem-estimate=1.11GB mem-reservation=0B thread-reservation=0
 |  tuple-ids=46 row-size=335B cardinality=863.99M cost=797213061
 |  in pipelines: 79(GETNEXT)
 |
-F52:PLAN FRAGMENT [HASH(i_item_sk,s_store_name,s_zip)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=2.29GB mem-reservation=12.00MB thread-reservation=1
-max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-result=1576 [max(120 (self) vs 1576 (sum children))]
+F52:PLAN FRAGMENT [HASH(i_item_sk,s_store_name,s_zip)] hosts=10 instances=110 (adjusted from 120)
+Per-Instance Resources: mem-estimate=2.49GB mem-reservation=12.00MB thread-reservation=1
+max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-result=1516 [max(110 (self) vs 1516 (sum children))]
 79:SORT
 |  order by: product_name ASC, store_name ASC, cnt ASC, s1 ASC, s1 ASC
-|  mem-estimate=2.25GB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=2.45GB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=46 row-size=335B cardinality=863.99M cost=12938654601
 |  in pipelines: 79(GETNEXT), 106(OPEN)
 |
@@ -914,14 +914,14 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  tuple-ids=21,44 row-size=574B cardinality=863.99M cost=378170002
 |  in pipelines: 106(GETNEXT), 133(OPEN)
 |
-|--F54:PLAN FRAGMENT [HASH(i_item_sk,s_store_name,s_zip)] hosts=10 instances=120
-|  |  Per-Instance Resources: mem-estimate=2.17GB mem-reservation=34.00MB thread-reservation=1
-|  |  max-parallelism=1460 segment-costs=[2100244388] cpu-comparison-result=788 [max(120 (self) vs 788 (sum children))]
+|--F54:PLAN FRAGMENT [HASH(i_item_sk,s_store_name,s_zip)] hosts=10 instances=110 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=2.36GB mem-reservation=34.00MB thread-reservation=1
+|  |  max-parallelism=1460 segment-costs=[2100244388] cpu-comparison-result=758 [max(110 (self) vs 758 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: i_item_sk, s_store_name, s_zip
 |  |  runtime filters: RF003[min_max] <- i_item_sk, RF004[min_max] <- s_store_name, RF005[min_max] <- s_zip
-|  |  mem-estimate=2.12GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863993608
+|  |  mem-estimate=2.32GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863993608
 |  |
 |  135:EXCHANGE [HASH(i_item_sk,s_store_name,s_zip)]
 |  |  mem-estimate=44.09MB mem-reservation=0B thread-reservation=0
@@ -929,8 +929,8 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 133(GETNEXT)
 |  |
 |  F51:PLAN FRAGMENT [HASH(i_product_name,i_item_sk,s_store_name,s_zip,ad1.ca_street_number,ad1.ca_street_name,ad1.ca_city,ad1.ca_zip,ad2.ca_street_number,ad2.ca_street_name,ad2.ca_city,ad2.ca_zip,d1.d_year,d2.d_year,d3.d_year)] hosts=10 instances=120
-|  Per-Instance Resources: mem-estimate=648.46MB mem-reservation=34.00MB thread-reservation=1
-|  max-parallelism=1650 segment-costs=[6517498108, 16408784776] cpu-comparison-result=788 [max(120 (self) vs 788 (sum children))]
+|  Per-Instance Resources: mem-estimate=637.09MB mem-reservation=34.00MB thread-reservation=1
+|  max-parallelism=1650 segment-costs=[6517498108, 16408784776] cpu-comparison-result=758 [max(120 (self) vs 758 (sum children))]
 |  133:AGGREGATE [FINALIZE]
 |  |  output: count:merge(*), sum:merge(ss_wholesale_cost), sum:merge(ss_list_price), sum:merge(ss_coupon_amt)
 |  |  group by: i_product_name, i_item_sk, s_store_name, s_zip, ad1.ca_street_number, ad1.ca_street_name, ad1.ca_city, ad1.ca_zip, ad2.ca_street_number, ad2.ca_street_name, ad2.ca_city, ad2.ca_zip, d1.d_year, d2.d_year, d3.d_year
@@ -944,8 +944,8 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT)
 |  |
 |  F44:PLAN FRAGMENT [HASH(c_current_addr_sk)] hosts=10 instances=120
-|  Per-Instance Resources: mem-estimate=689.42MB mem-reservation=34.00MB thread-reservation=1
-|  max-parallelism=1650 segment-costs=[5515620261, 16408784776] cpu-comparison-result=788 [max(300 (self) vs 788 (sum children))]
+|  Per-Instance Resources: mem-estimate=685.54MB mem-reservation=34.00MB thread-reservation=1
+|  max-parallelism=1650 segment-costs=[5515620261, 16408784776] cpu-comparison-result=758 [max(270 (self) vs 758 (sum children))]
 |  77:AGGREGATE [STREAMING]
 |  |  output: count(*), sum(ss_wholesale_cost), sum(ss_list_price), sum(ss_coupon_amt)
 |  |  group by: i_product_name, i_item_sk, s_store_name, s_zip, ad1.ca_street_number, ad1.ca_street_name, ad1.ca_city, ad1.ca_zip, ad2.ca_street_number, ad2.ca_street_name, ad2.ca_city, ad2.ca_zip, d1.d_year, d2.d_year, d3.d_year
@@ -1163,12 +1163,12 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |     in pipelines: 56(GETNEXT)
 |  |
 |  123:EXCHANGE [HASH(c_current_addr_sk)]
-|  |  mem-estimate=40.99MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=37.12MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=24,23,43,29,33,39,37,38,34,35,30,31,32,36 row-size=341B cardinality=20.88M cost=45040238
 |  |  in pipelines: 40(GETNEXT)
 |  |
-|  F34:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=80 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=202.85MB mem-reservation=0B thread-reservation=1
+|  F34:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=70 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=201.13MB mem-reservation=0B thread-reservation=1
 |  max-parallelism=80 segment-costs=[715872955]
 |  72:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=06
@@ -1179,13 +1179,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 52(OPEN)
 |  |
 |  |--F60:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=15.52MB mem-reservation=15.50MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=13.58MB mem-reservation=13.56MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[4190]
 |  |  JOIN BUILD
 |  |  |  join-table-id=06 plan-id=07 cohort-id=02
 |  |  |  build expressions: p_promo_sk
 |  |  |  runtime filters: RF055[min_max] <- p_promo_sk
-|  |  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=1800
+|  |  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=1800
 |  |  |
 |  |  122:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -1214,13 +1214,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 48(OPEN)
 |  |
 |  |--F61:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=15.59MB mem-reservation=15.50MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=13.65MB mem-reservation=13.56MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[3140]
 |  |  JOIN BUILD
 |  |  |  join-table-id=07 plan-id=08 cohort-id=02
 |  |  |  build expressions: s_store_sk
 |  |  |  runtime filters: RF057[min_max] <- s_store_sk
-|  |  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=1350
+|  |  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=1350
 |  |  |
 |  |  121:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=89.64KB mem-reservation=0B thread-reservation=0
@@ -1249,13 +1249,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 47(OPEN)
 |  |
 |  |--F62:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=38.57MB mem-reservation=38.00MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=33.82MB mem-reservation=33.25MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[170129]
 |  |  JOIN BUILD
 |  |  |  join-table-id=08 plan-id=09 cohort-id=02
 |  |  |  build expressions: d3.d_date_sk
 |  |  |  runtime filters: RF059[min_max] <- d3.d_date_sk
-|  |  |  mem-estimate=38.00MB mem-reservation=38.00MB spill-buffer=256.00KB thread-reservation=0 cost=73049
+|  |  |  mem-estimate=33.25MB mem-reservation=33.25MB spill-buffer=256.00KB thread-reservation=0 cost=73049
 |  |  |
 |  |  120:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=582.70KB mem-reservation=0B thread-reservation=0
@@ -1284,13 +1284,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 46(OPEN)
 |  |
 |  |--F63:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=38.57MB mem-reservation=38.00MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=33.82MB mem-reservation=33.25MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[170129]
 |  |  JOIN BUILD
 |  |  |  join-table-id=09 plan-id=10 cohort-id=02
 |  |  |  build expressions: d2.d_date_sk
 |  |  |  runtime filters: RF061[min_max] <- d2.d_date_sk
-|  |  |  mem-estimate=38.00MB mem-reservation=38.00MB spill-buffer=256.00KB thread-reservation=0 cost=73049
+|  |  |  mem-estimate=33.25MB mem-reservation=33.25MB spill-buffer=256.00KB thread-reservation=0 cost=73049
 |  |  |
 |  |  119:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=582.70KB mem-reservation=0B thread-reservation=0
@@ -1320,13 +1320,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 51(OPEN)
 |  |
 |  |--F64:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=282.21MB mem-reservation=272.00MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=248.21MB mem-reservation=238.00MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[4473540]
 |  |  JOIN BUILD
 |  |  |  join-table-id=10 plan-id=11 cohort-id=02
 |  |  |  build expressions: cd2.cd_demo_sk
 |  |  |  runtime filters: RF063[min_max] <- cd2.cd_demo_sk
-|  |  |  mem-estimate=272.00MB mem-reservation=272.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
+|  |  |  mem-estimate=238.00MB mem-reservation=238.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
 |  |  |
 |  |  118:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.21MB mem-reservation=0B thread-reservation=0
@@ -1355,13 +1355,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 50(OPEN)
 |  |
 |  |--F65:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=282.21MB mem-reservation=272.00MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=248.21MB mem-reservation=238.00MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[4473540]
 |  |  JOIN BUILD
 |  |  |  join-table-id=11 plan-id=12 cohort-id=02
 |  |  |  build expressions: cd1.cd_demo_sk
 |  |  |  runtime filters: RF065[min_max] <- cd1.cd_demo_sk
-|  |  |  mem-estimate=272.00MB mem-reservation=272.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
+|  |  |  mem-estimate=238.00MB mem-reservation=238.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
 |  |  |
 |  |  117:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.21MB mem-reservation=0B thread-reservation=0
@@ -1390,13 +1390,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 54(OPEN)
 |  |
 |  |--F66:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=15.57MB mem-reservation=15.50MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=13.63MB mem-reservation=13.56MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[16760]
 |  |  JOIN BUILD
 |  |  |  join-table-id=12 plan-id=13 cohort-id=02
 |  |  |  build expressions: hd2.hd_demo_sk
 |  |  |  runtime filters: RF067[min_max] <- hd2.hd_demo_sk
-|  |  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=7200
+|  |  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=7200
 |  |  |
 |  |  116:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=68.25KB mem-reservation=0B thread-reservation=0
@@ -1426,13 +1426,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 53(OPEN)
 |  |
 |  |--F67:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=15.57MB mem-reservation=15.50MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=13.63MB mem-reservation=13.56MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[16760]
 |  |  JOIN BUILD
 |  |  |  join-table-id=13 plan-id=14 cohort-id=02
 |  |  |  build expressions: hd1.hd_demo_sk
 |  |  |  runtime filters: RF069[min_max] <- hd1.hd_demo_sk
-|  |  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=7200
+|  |  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=7200
 |  |  |
 |  |  115:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=68.25KB mem-reservation=0B thread-reservation=0
@@ -1461,7 +1461,7 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  tuple-ids=24,23,43,29,33,39 row-size=234B cardinality=22.46M cost=10025023
 |  |  in pipelines: 40(GETNEXT), 55(OPEN)
 |  |
-|  |--F68:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=80 (adjusted from 120)
+|  |--F68:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=70 (adjusted from 120)
 |  |  |  Per-Instance Resources: mem-estimate=44.80MB mem-reservation=34.00MB thread-reservation=1
 |  |  |  max-parallelism=80 segment-costs=[22017902]
 |  |  JOIN BUILD
@@ -1476,7 +1476,7 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  |  in pipelines: 55(GETNEXT)
 |  |  |
 |  |  F33:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=41.49MB mem-reservation=128.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=38.30MB mem-reservation=128.00KB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[89031849]
 |  |  55:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address ad1, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=1.16MB
@@ -1489,12 +1489,12 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |     in pipelines: 55(GETNEXT)
 |  |
 |  113:EXCHANGE [HASH(ss_addr_sk)]
-|  |  mem-estimate=16.88MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=15.16MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=24,23,43,29,33 row-size=156B cardinality=23.22M cost=22680993
 |  |  in pipelines: 40(GETNEXT)
 |  |
-|  F32:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=40 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=69.42MB mem-reservation=0B thread-reservation=1
+|  F32:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=61.08MB mem-reservation=0B thread-reservation=1
 |  max-parallelism=40 segment-costs=[325063575]
 |  63:HASH JOIN [INNER JOIN, PARTITIONED]
 |  |  hash-table-id=15
@@ -1504,14 +1504,14 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  tuple-ids=24,23,43,29,33 row-size=156B cardinality=23.22M cost=10693595
 |  |  in pipelines: 40(GETNEXT), 49(OPEN)
 |  |
-|  |--F69:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=40 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=46.64MB mem-reservation=34.00MB thread-reservation=1
+|  |--F69:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=58.76MB mem-reservation=34.00MB thread-reservation=1
 |  |  |  max-parallelism=40 segment-costs=[36645000]
 |  |  JOIN BUILD
 |  |  |  join-table-id=15 plan-id=16 cohort-id=02
 |  |  |  build expressions: c_customer_sk
 |  |  |  runtime filters: RF073[min_max] <- c_customer_sk
-|  |  |  mem-estimate=36.37MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
+|  |  |  mem-estimate=48.49MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
 |  |  |
 |  |  112:EXCHANGE [HASH(c_customer_sk)]
 |  |  |  mem-estimate=10.27MB mem-reservation=0B thread-reservation=0
@@ -1519,7 +1519,7 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  |  in pipelines: 49(GETNEXT)
 |  |  |
 |  |  F31:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=20.38MB mem-reservation=1.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=19.28MB mem-reservation=1.00MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[72192000]
 |  |  49:SCAN HDFS [tpcds_partitioned_parquet_snap.customer, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=5.49MB
@@ -1533,12 +1533,12 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |     in pipelines: 49(GETNEXT)
 |  |
 |  111:EXCHANGE [HASH(ss_customer_sk)]
-|  |  mem-estimate=14.34MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=12.90MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=24,23,43,29 row-size=132B cardinality=25.29M cost=20984990
 |  |  in pipelines: 40(GETNEXT)
 |  |
-|  F30:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=30 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=33.63MB mem-reservation=0B thread-reservation=1
+|  F30:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=27.84MB mem-reservation=0B thread-reservation=1
 |  max-parallelism=30 segment-costs=[299440393]
 |  62:HASH JOIN [INNER JOIN, PARTITIONED]
 |  |  hash-table-id=16
@@ -1548,14 +1548,14 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  tuple-ids=24,23,43,29 row-size=132B cardinality=25.29M cost=21190008
 |  |  in pipelines: 40(GETNEXT), 39(OPEN)
 |  |
-|  |--F70:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=30 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=207.29MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
-|  |  |  max-parallelism=30 segment-costs=[63285631] cpu-comparison-result=150 [max(150 (self) vs 25 (sum children))]
+|  |--F70:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=289.68MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
+|  |  |  max-parallelism=30 segment-costs=[63285631] cpu-comparison-result=140 [max(140 (self) vs 25 (sum children))]
 |  |  JOIN BUILD
 |  |  |  join-table-id=16 plan-id=17 cohort-id=02
 |  |  |  build expressions: ss_item_sk, ss_ticket_number
 |  |  |  runtime filters: RF074[bloom] <- ss_item_sk, RF075[bloom] <- ss_ticket_number, RF076[min_max] <- ss_item_sk, RF077[min_max] <- ss_ticket_number
-|  |  |  mem-estimate=164.79MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=36417729
+|  |  |  mem-estimate=247.19MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=36417729
 |  |  |
 |  |  110:EXCHANGE [HASH(ss_item_sk,ss_ticket_number)]
 |  |  |  mem-estimate=25.50MB mem-reservation=0B thread-reservation=0
@@ -1564,7 +1564,7 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  |
 |  |  F27:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  |  Per-Host Shared Resources: mem-estimate=2.00MB mem-reservation=2.00MB thread-reservation=0 runtime-filters-memory=2.00MB
-|  |  Per-Instance Resources: mem-estimate=31.50MB mem-reservation=8.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=26.33MB mem-reservation=8.00MB thread-reservation=1
 |  |  max-parallelism=180 segment-costs=[1718820654]
 |  |  61:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  |  hash-table-id=17
@@ -1662,7 +1662,7 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |
 |  F26:PLAN FRAGMENT [RANDOM] hosts=10 instances=30 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=17.00MB mem-reservation=17.00MB thread-reservation=0 runtime-filters-memory=17.00MB
-|  Per-Instance Resources: mem-estimate=17.88MB mem-reservation=512.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=17.25MB mem-reservation=512.00KB thread-reservation=1
 |  max-parallelism=30 segment-costs=[232690522]
 |  40:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -1682,8 +1682,8 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  in pipelines: 106(GETNEXT)
 |
 F25:PLAN FRAGMENT [HASH(i_product_name,i_item_sk,s_store_name,s_zip,ad1.ca_street_number,ad1.ca_street_name,ad1.ca_city,ad1.ca_zip,ad2.ca_street_number,ad2.ca_street_name,ad2.ca_city,ad2.ca_zip,d1.d_year,d2.d_year,d3.d_year)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=648.46MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=1650 segment-costs=[6517498108, 16408784776] cpu-comparison-result=788 [max(120 (self) vs 788 (sum children))]
+Per-Instance Resources: mem-estimate=637.09MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=1650 segment-costs=[6517498108, 16408784776] cpu-comparison-result=758 [max(120 (self) vs 758 (sum children))]
 106:AGGREGATE [FINALIZE]
 |  output: count:merge(*), sum:merge(ss_wholesale_cost), sum:merge(ss_list_price), sum:merge(ss_coupon_amt)
 |  group by: i_product_name, i_item_sk, s_store_name, s_zip, ad1.ca_street_number, ad1.ca_street_name, ad1.ca_city, ad1.ca_zip, ad2.ca_street_number, ad2.ca_street_name, ad2.ca_city, ad2.ca_zip, d1.d_year, d2.d_year, d3.d_year
@@ -1697,8 +1697,8 @@ max-parallelism=1650 segment-costs=[6517498108, 16408784776] cpu-comparison-resu
 |  in pipelines: 01(GETNEXT)
 |
 F18:PLAN FRAGMENT [HASH(c_current_addr_sk)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=689.42MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=1650 segment-costs=[5515620261, 16408784776] cpu-comparison-result=788 [max(300 (self) vs 788 (sum children))]
+Per-Instance Resources: mem-estimate=685.54MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=1650 segment-costs=[5515620261, 16408784776] cpu-comparison-result=758 [max(270 (self) vs 758 (sum children))]
 38:AGGREGATE [STREAMING]
 |  output: count(*), sum(ss_wholesale_cost), sum(ss_list_price), sum(ss_coupon_amt)
 |  group by: i_product_name, i_item_sk, s_store_name, s_zip, ad1.ca_street_number, ad1.ca_street_name, ad1.ca_city, ad1.ca_zip, ad2.ca_street_number, ad2.ca_street_name, ad2.ca_city, ad2.ca_zip, d1.d_year, d2.d_year, d3.d_year
@@ -1918,12 +1918,12 @@ max-parallelism=1650 segment-costs=[5515620261, 16408784776] cpu-comparison-resu
 |     in pipelines: 17(GETNEXT)
 |
 96:EXCHANGE [HASH(c_current_addr_sk)]
-|  mem-estimate=40.99MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=37.12MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=1,0,20,6,10,16,14,15,11,12,7,8,9,13 row-size=341B cardinality=20.88M cost=45040238
 |  in pipelines: 01(GETNEXT)
 |
-F08:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=80 (adjusted from 120)
-Per-Instance Resources: mem-estimate=202.85MB mem-reservation=0B thread-reservation=1
+F08:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=70 (adjusted from 120)
+Per-Instance Resources: mem-estimate=201.13MB mem-reservation=0B thread-reservation=1
 max-parallelism=80 segment-costs=[715872955]
 33:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash-table-id=24
@@ -1934,13 +1934,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 13(OPEN)
 |
 |--F78:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=15.52MB mem-reservation=15.50MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=13.58MB mem-reservation=13.56MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[4190]
 |  JOIN BUILD
 |  |  join-table-id=24 plan-id=25 cohort-id=01
 |  |  build expressions: p_promo_sk
 |  |  runtime filters: RF015[min_max] <- p_promo_sk
-|  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=1800
+|  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=1800
 |  |
 |  95:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -1969,13 +1969,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 09(OPEN)
 |
 |--F79:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=15.59MB mem-reservation=15.50MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=13.65MB mem-reservation=13.56MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[3140]
 |  JOIN BUILD
 |  |  join-table-id=25 plan-id=26 cohort-id=01
 |  |  build expressions: s_store_sk
 |  |  runtime filters: RF017[min_max] <- s_store_sk
-|  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=1350
+|  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=1350
 |  |
 |  94:EXCHANGE [BROADCAST]
 |  |  mem-estimate=89.64KB mem-reservation=0B thread-reservation=0
@@ -2005,13 +2005,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 08(OPEN)
 |
 |--F80:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=38.57MB mem-reservation=38.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=33.82MB mem-reservation=33.25MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[170129]
 |  JOIN BUILD
 |  |  join-table-id=26 plan-id=27 cohort-id=01
 |  |  build expressions: d3.d_date_sk
 |  |  runtime filters: RF019[min_max] <- d3.d_date_sk
-|  |  mem-estimate=38.00MB mem-reservation=38.00MB spill-buffer=256.00KB thread-reservation=0 cost=73049
+|  |  mem-estimate=33.25MB mem-reservation=33.25MB spill-buffer=256.00KB thread-reservation=0 cost=73049
 |  |
 |  93:EXCHANGE [BROADCAST]
 |  |  mem-estimate=582.70KB mem-reservation=0B thread-reservation=0
@@ -2040,13 +2040,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 07(OPEN)
 |
 |--F81:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=38.57MB mem-reservation=38.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=33.82MB mem-reservation=33.25MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[170129]
 |  JOIN BUILD
 |  |  join-table-id=27 plan-id=28 cohort-id=01
 |  |  build expressions: d2.d_date_sk
 |  |  runtime filters: RF021[min_max] <- d2.d_date_sk
-|  |  mem-estimate=38.00MB mem-reservation=38.00MB spill-buffer=256.00KB thread-reservation=0 cost=73049
+|  |  mem-estimate=33.25MB mem-reservation=33.25MB spill-buffer=256.00KB thread-reservation=0 cost=73049
 |  |
 |  92:EXCHANGE [BROADCAST]
 |  |  mem-estimate=582.70KB mem-reservation=0B thread-reservation=0
@@ -2076,13 +2076,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 12(OPEN)
 |
 |--F82:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=282.21MB mem-reservation=272.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=248.21MB mem-reservation=238.00MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[4473540]
 |  JOIN BUILD
 |  |  join-table-id=28 plan-id=29 cohort-id=01
 |  |  build expressions: cd2.cd_demo_sk
 |  |  runtime filters: RF023[min_max] <- cd2.cd_demo_sk
-|  |  mem-estimate=272.00MB mem-reservation=272.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
+|  |  mem-estimate=238.00MB mem-reservation=238.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
 |  |
 |  91:EXCHANGE [BROADCAST]
 |  |  mem-estimate=10.21MB mem-reservation=0B thread-reservation=0
@@ -2111,13 +2111,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 11(OPEN)
 |
 |--F83:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=282.21MB mem-reservation=272.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=248.21MB mem-reservation=238.00MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[4473540]
 |  JOIN BUILD
 |  |  join-table-id=29 plan-id=30 cohort-id=01
 |  |  build expressions: cd1.cd_demo_sk
 |  |  runtime filters: RF025[min_max] <- cd1.cd_demo_sk
-|  |  mem-estimate=272.00MB mem-reservation=272.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
+|  |  mem-estimate=238.00MB mem-reservation=238.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
 |  |
 |  90:EXCHANGE [BROADCAST]
 |  |  mem-estimate=10.21MB mem-reservation=0B thread-reservation=0
@@ -2146,13 +2146,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 15(OPEN)
 |
 |--F84:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=15.57MB mem-reservation=15.50MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=13.63MB mem-reservation=13.56MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[16760]
 |  JOIN BUILD
 |  |  join-table-id=30 plan-id=31 cohort-id=01
 |  |  build expressions: hd2.hd_demo_sk
 |  |  runtime filters: RF027[min_max] <- hd2.hd_demo_sk
-|  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=7200
+|  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=7200
 |  |
 |  89:EXCHANGE [BROADCAST]
 |  |  mem-estimate=68.25KB mem-reservation=0B thread-reservation=0
@@ -2182,13 +2182,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 14(OPEN)
 |
 |--F85:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=15.57MB mem-reservation=15.50MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=13.63MB mem-reservation=13.56MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[16760]
 |  JOIN BUILD
 |  |  join-table-id=31 plan-id=32 cohort-id=01
 |  |  build expressions: hd1.hd_demo_sk
 |  |  runtime filters: RF029[min_max] <- hd1.hd_demo_sk
-|  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=7200
+|  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=7200
 |  |
 |  88:EXCHANGE [BROADCAST]
 |  |  mem-estimate=68.25KB mem-reservation=0B thread-reservation=0
@@ -2217,7 +2217,7 @@ max-parallelism=80 segment-costs=[715872955]
 |  tuple-ids=1,0,20,6,10,16 row-size=234B cardinality=22.46M cost=10025023
 |  in pipelines: 01(GETNEXT), 16(OPEN)
 |
-|--F86:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=80 (adjusted from 120)
+|--F86:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=70 (adjusted from 120)
 |  |  Per-Instance Resources: mem-estimate=44.80MB mem-reservation=34.00MB thread-reservation=1
 |  |  max-parallelism=80 segment-costs=[22017902]
 |  JOIN BUILD
@@ -2232,7 +2232,7 @@ max-parallelism=80 segment-costs=[715872955]
 |  |  in pipelines: 16(GETNEXT)
 |  |
 |  F07:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
-|  Per-Instance Resources: mem-estimate=41.49MB mem-reservation=128.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=38.30MB mem-reservation=128.00KB thread-reservation=1
 |  max-parallelism=10 segment-costs=[89031849]
 |  16:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address ad1, RANDOM]
 |     HDFS partitions=1/1 files=1 size=1.16MB
@@ -2245,12 +2245,12 @@ max-parallelism=80 segment-costs=[715872955]
 |     in pipelines: 16(GETNEXT)
 |
 86:EXCHANGE [HASH(ss_addr_sk)]
-|  mem-estimate=16.88MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=15.16MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=1,0,20,6,10 row-size=156B cardinality=23.22M cost=22680993
 |  in pipelines: 01(GETNEXT)
 |
-F06:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=40 (adjusted from 120)
-Per-Instance Resources: mem-estimate=69.42MB mem-reservation=0B thread-reservation=1
+F06:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
+Per-Instance Resources: mem-estimate=61.08MB mem-reservation=0B thread-reservation=1
 max-parallelism=40 segment-costs=[325063575]
 24:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=33
@@ -2260,14 +2260,14 @@ max-parallelism=40 segment-costs=[325063575]
 |  tuple-ids=1,0,20,6,10 row-size=156B cardinality=23.22M cost=10693595
 |  in pipelines: 01(GETNEXT), 10(OPEN)
 |
-|--F87:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=40 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=46.64MB mem-reservation=34.00MB thread-reservation=1
+|--F87:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=58.76MB mem-reservation=34.00MB thread-reservation=1
 |  |  max-parallelism=40 segment-costs=[36645000]
 |  JOIN BUILD
 |  |  join-table-id=33 plan-id=34 cohort-id=01
 |  |  build expressions: c_customer_sk
 |  |  runtime filters: RF033[min_max] <- c_customer_sk
-|  |  mem-estimate=36.37MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
+|  |  mem-estimate=48.49MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
 |  |
 |  85:EXCHANGE [HASH(c_customer_sk)]
 |  |  mem-estimate=10.27MB mem-reservation=0B thread-reservation=0
@@ -2275,7 +2275,7 @@ max-parallelism=40 segment-costs=[325063575]
 |  |  in pipelines: 10(GETNEXT)
 |  |
 |  F05:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
-|  Per-Instance Resources: mem-estimate=20.38MB mem-reservation=1.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=19.28MB mem-reservation=1.00MB thread-reservation=1
 |  max-parallelism=10 segment-costs=[72192000]
 |  10:SCAN HDFS [tpcds_partitioned_parquet_snap.customer, RANDOM]
 |     HDFS partitions=1/1 files=1 size=5.49MB
@@ -2289,12 +2289,12 @@ max-parallelism=40 segment-costs=[325063575]
 |     in pipelines: 10(GETNEXT)
 |
 84:EXCHANGE [HASH(ss_customer_sk)]
-|  mem-estimate=14.34MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=12.90MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=1,0,20,6 row-size=132B cardinality=25.29M cost=20984990
 |  in pipelines: 01(GETNEXT)
 |
-F04:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=30 (adjusted from 120)
-Per-Instance Resources: mem-estimate=33.63MB mem-reservation=0B thread-reservation=1
+F04:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
+Per-Instance Resources: mem-estimate=27.84MB mem-reservation=0B thread-reservation=1
 max-parallelism=30 segment-costs=[299440393]
 23:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=34
@@ -2304,14 +2304,14 @@ max-parallelism=30 segment-costs=[299440393]
 |  tuple-ids=1,0,20,6 row-size=132B cardinality=25.29M cost=21190008
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
-|--F88:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=30 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=207.29MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
-|  |  max-parallelism=30 segment-costs=[63285631] cpu-comparison-result=150 [max(150 (self) vs 25 (sum children))]
+|--F88:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=289.68MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
+|  |  max-parallelism=30 segment-costs=[63285631] cpu-comparison-result=140 [max(140 (self) vs 25 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=34 plan-id=35 cohort-id=01
 |  |  build expressions: ss_item_sk, ss_ticket_number
 |  |  runtime filters: RF034[bloom] <- ss_item_sk, RF035[bloom] <- ss_ticket_number, RF036[min_max] <- ss_item_sk, RF037[min_max] <- ss_ticket_number
-|  |  mem-estimate=164.79MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=36417729
+|  |  mem-estimate=247.19MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=36417729
 |  |
 |  83:EXCHANGE [HASH(ss_item_sk,ss_ticket_number)]
 |  |  mem-estimate=25.50MB mem-reservation=0B thread-reservation=0
@@ -2320,7 +2320,7 @@ max-parallelism=30 segment-costs=[299440393]
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=2.00MB mem-reservation=2.00MB thread-reservation=0 runtime-filters-memory=2.00MB
-|  Per-Instance Resources: mem-estimate=31.50MB mem-reservation=8.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=26.33MB mem-reservation=8.00MB thread-reservation=1
 |  max-parallelism=180 segment-costs=[1718820654]
 |  22:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=35
@@ -2418,7 +2418,7 @@ max-parallelism=30 segment-costs=[299440393]
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=30 (adjusted from 120)
 Per-Host Shared Resources: mem-estimate=17.00MB mem-reservation=17.00MB thread-reservation=0 runtime-filters-memory=17.00MB
-Per-Instance Resources: mem-estimate=17.88MB mem-reservation=512.00KB thread-reservation=1
+Per-Instance Resources: mem-estimate=17.25MB mem-reservation=512.00KB thread-reservation=1
 max-parallelism=30 segment-costs=[232690522]
 01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
    HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -2432,27 +2432,27 @@ max-parallelism=30 segment-costs=[232690522]
    tuple-ids=1 row-size=12B cardinality=64.75M(filtered from 863.99M) cost=149297235
    in pipelines: 01(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=6.54GB Threads=339
-Per-Host Resource Estimates: Memory=102.75GB
+Max Per-Host Resource Reservation: Memory=6.10GB Threads=325
+Per-Host Resource Estimates: Memory=101.02GB
 F53:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
-|  Per-Instance Resources: mem-estimate=1.31GB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[18941077893] cpu-comparison-result=1576 [max(1 (self) vs 1576 (sum children))]
+|  Per-Instance Resources: mem-estimate=1.21GB mem-reservation=4.00MB thread-reservation=1
+|  max-parallelism=1 segment-costs=[18941077893] cpu-comparison-result=1516 [max(1 (self) vs 1516 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: product_name, store_name, store_zip, b_street_number, b_street_name, b_city, b_zip, c_street_number, c_street_name, c_city, c_zip, syear, cnt, s1, s2, s3, s1, s2, s3, syear, cnt
 |  mem-estimate=100.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=18143864832
 |
 136:MERGING-EXCHANGE [UNPARTITIONED]
 |  order by: product_name ASC, store_name ASC, cnt ASC, s1 ASC, s1 ASC
-|  mem-estimate=1.21GB mem-reservation=0B thread-reservation=0
+|  mem-estimate=1.11GB mem-reservation=0B thread-reservation=0
 |  tuple-ids=46 row-size=335B cardinality=863.99M cost=797213061
 |  in pipelines: 79(GETNEXT)
 |
-F52:PLAN FRAGMENT [HASH(i_item_sk,s_store_name,s_zip)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=2.29GB mem-reservation=12.00MB thread-reservation=1
-max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-result=1576 [max(120 (self) vs 1576 (sum children))]
+F52:PLAN FRAGMENT [HASH(i_item_sk,s_store_name,s_zip)] hosts=10 instances=110 (adjusted from 120)
+Per-Instance Resources: mem-estimate=2.49GB mem-reservation=12.00MB thread-reservation=1
+max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-result=1516 [max(110 (self) vs 1516 (sum children))]
 79:SORT
 |  order by: product_name ASC, store_name ASC, cnt ASC, s1 ASC, s1 ASC
-|  mem-estimate=2.25GB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=2.45GB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=46 row-size=335B cardinality=863.99M cost=12938654601
 |  in pipelines: 79(GETNEXT), 106(OPEN)
 |
@@ -2465,14 +2465,14 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  tuple-ids=21,44 row-size=574B cardinality=863.99M cost=378170002
 |  in pipelines: 106(GETNEXT), 133(OPEN)
 |
-|--F54:PLAN FRAGMENT [HASH(i_item_sk,s_store_name,s_zip)] hosts=10 instances=120
-|  |  Per-Instance Resources: mem-estimate=2.17GB mem-reservation=34.00MB thread-reservation=1
-|  |  max-parallelism=1460 segment-costs=[2100244388] cpu-comparison-result=788 [max(120 (self) vs 788 (sum children))]
+|--F54:PLAN FRAGMENT [HASH(i_item_sk,s_store_name,s_zip)] hosts=10 instances=110 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=2.36GB mem-reservation=34.00MB thread-reservation=1
+|  |  max-parallelism=1460 segment-costs=[2100244388] cpu-comparison-result=758 [max(110 (self) vs 758 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: i_item_sk, s_store_name, s_zip
 |  |  runtime filters: RF003[min_max] <- i_item_sk, RF004[min_max] <- s_store_name, RF005[min_max] <- s_zip
-|  |  mem-estimate=2.12GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863993608
+|  |  mem-estimate=2.32GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863993608
 |  |
 |  135:EXCHANGE [HASH(i_item_sk,s_store_name,s_zip)]
 |  |  mem-estimate=44.09MB mem-reservation=0B thread-reservation=0
@@ -2480,8 +2480,8 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 133(GETNEXT)
 |  |
 |  F51:PLAN FRAGMENT [HASH(i_product_name,i_item_sk,s_store_name,s_zip,ad1.ca_street_number,ad1.ca_street_name,ad1.ca_city,ad1.ca_zip,ad2.ca_street_number,ad2.ca_street_name,ad2.ca_city,ad2.ca_zip,d1.d_year,d2.d_year,d3.d_year)] hosts=10 instances=120
-|  Per-Instance Resources: mem-estimate=648.46MB mem-reservation=34.00MB thread-reservation=1
-|  max-parallelism=1650 segment-costs=[6517498108, 16408784776] cpu-comparison-result=788 [max(120 (self) vs 788 (sum children))]
+|  Per-Instance Resources: mem-estimate=637.09MB mem-reservation=34.00MB thread-reservation=1
+|  max-parallelism=1650 segment-costs=[6517498108, 16408784776] cpu-comparison-result=758 [max(120 (self) vs 758 (sum children))]
 |  133:AGGREGATE [FINALIZE]
 |  |  output: count:merge(*), sum:merge(ss_wholesale_cost), sum:merge(ss_list_price), sum:merge(ss_coupon_amt)
 |  |  group by: i_product_name, i_item_sk, s_store_name, s_zip, ad1.ca_street_number, ad1.ca_street_name, ad1.ca_city, ad1.ca_zip, ad2.ca_street_number, ad2.ca_street_name, ad2.ca_city, ad2.ca_zip, d1.d_year, d2.d_year, d3.d_year
@@ -2495,8 +2495,8 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT)
 |  |
 |  F44:PLAN FRAGMENT [HASH(c_current_addr_sk)] hosts=10 instances=120
-|  Per-Instance Resources: mem-estimate=689.42MB mem-reservation=34.00MB thread-reservation=1
-|  max-parallelism=1650 segment-costs=[5515620261, 16408784776] cpu-comparison-result=788 [max(300 (self) vs 788 (sum children))]
+|  Per-Instance Resources: mem-estimate=685.54MB mem-reservation=34.00MB thread-reservation=1
+|  max-parallelism=1650 segment-costs=[5515620261, 16408784776] cpu-comparison-result=758 [max(270 (self) vs 758 (sum children))]
 |  77:AGGREGATE [STREAMING]
 |  |  output: count(*), sum(ss_wholesale_cost), sum(ss_list_price), sum(ss_coupon_amt)
 |  |  group by: i_product_name, i_item_sk, s_store_name, s_zip, ad1.ca_street_number, ad1.ca_street_name, ad1.ca_city, ad1.ca_zip, ad2.ca_street_number, ad2.ca_street_name, ad2.ca_city, ad2.ca_zip, d1.d_year, d2.d_year, d3.d_year
@@ -2714,12 +2714,12 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |     in pipelines: 56(GETNEXT)
 |  |
 |  123:EXCHANGE [HASH(c_current_addr_sk)]
-|  |  mem-estimate=40.99MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=37.12MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=24,23,43,29,33,39,37,38,34,35,30,31,32,36 row-size=341B cardinality=20.88M cost=45040238
 |  |  in pipelines: 40(GETNEXT)
 |  |
-|  F34:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=80 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=202.85MB mem-reservation=0B thread-reservation=1
+|  F34:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=70 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=201.13MB mem-reservation=0B thread-reservation=1
 |  max-parallelism=80 segment-costs=[715872955]
 |  72:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=06
@@ -2730,13 +2730,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 52(OPEN)
 |  |
 |  |--F60:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=15.52MB mem-reservation=15.50MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=13.58MB mem-reservation=13.56MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[4190]
 |  |  JOIN BUILD
 |  |  |  join-table-id=06 plan-id=07 cohort-id=02
 |  |  |  build expressions: p_promo_sk
 |  |  |  runtime filters: RF055[min_max] <- p_promo_sk
-|  |  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=1800
+|  |  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=1800
 |  |  |
 |  |  122:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -2765,13 +2765,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 48(OPEN)
 |  |
 |  |--F61:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=15.59MB mem-reservation=15.50MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=13.65MB mem-reservation=13.56MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[3140]
 |  |  JOIN BUILD
 |  |  |  join-table-id=07 plan-id=08 cohort-id=02
 |  |  |  build expressions: s_store_sk
 |  |  |  runtime filters: RF057[min_max] <- s_store_sk
-|  |  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=1350
+|  |  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=1350
 |  |  |
 |  |  121:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=89.64KB mem-reservation=0B thread-reservation=0
@@ -2800,13 +2800,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 47(OPEN)
 |  |
 |  |--F62:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=38.57MB mem-reservation=38.00MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=33.82MB mem-reservation=33.25MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[170129]
 |  |  JOIN BUILD
 |  |  |  join-table-id=08 plan-id=09 cohort-id=02
 |  |  |  build expressions: d3.d_date_sk
 |  |  |  runtime filters: RF059[min_max] <- d3.d_date_sk
-|  |  |  mem-estimate=38.00MB mem-reservation=38.00MB spill-buffer=256.00KB thread-reservation=0 cost=73049
+|  |  |  mem-estimate=33.25MB mem-reservation=33.25MB spill-buffer=256.00KB thread-reservation=0 cost=73049
 |  |  |
 |  |  120:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=582.70KB mem-reservation=0B thread-reservation=0
@@ -2835,13 +2835,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 46(OPEN)
 |  |
 |  |--F63:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=38.57MB mem-reservation=38.00MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=33.82MB mem-reservation=33.25MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[170129]
 |  |  JOIN BUILD
 |  |  |  join-table-id=09 plan-id=10 cohort-id=02
 |  |  |  build expressions: d2.d_date_sk
 |  |  |  runtime filters: RF061[min_max] <- d2.d_date_sk
-|  |  |  mem-estimate=38.00MB mem-reservation=38.00MB spill-buffer=256.00KB thread-reservation=0 cost=73049
+|  |  |  mem-estimate=33.25MB mem-reservation=33.25MB spill-buffer=256.00KB thread-reservation=0 cost=73049
 |  |  |
 |  |  119:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=582.70KB mem-reservation=0B thread-reservation=0
@@ -2871,13 +2871,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 51(OPEN)
 |  |
 |  |--F64:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=282.21MB mem-reservation=272.00MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=248.21MB mem-reservation=238.00MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[4473540]
 |  |  JOIN BUILD
 |  |  |  join-table-id=10 plan-id=11 cohort-id=02
 |  |  |  build expressions: cd2.cd_demo_sk
 |  |  |  runtime filters: RF063[min_max] <- cd2.cd_demo_sk
-|  |  |  mem-estimate=272.00MB mem-reservation=272.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
+|  |  |  mem-estimate=238.00MB mem-reservation=238.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
 |  |  |
 |  |  118:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.21MB mem-reservation=0B thread-reservation=0
@@ -2906,13 +2906,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 50(OPEN)
 |  |
 |  |--F65:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=282.21MB mem-reservation=272.00MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=248.21MB mem-reservation=238.00MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[4473540]
 |  |  JOIN BUILD
 |  |  |  join-table-id=11 plan-id=12 cohort-id=02
 |  |  |  build expressions: cd1.cd_demo_sk
 |  |  |  runtime filters: RF065[min_max] <- cd1.cd_demo_sk
-|  |  |  mem-estimate=272.00MB mem-reservation=272.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
+|  |  |  mem-estimate=238.00MB mem-reservation=238.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
 |  |  |
 |  |  117:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=10.21MB mem-reservation=0B thread-reservation=0
@@ -2941,13 +2941,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 54(OPEN)
 |  |
 |  |--F66:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=15.57MB mem-reservation=15.50MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=13.63MB mem-reservation=13.56MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[16760]
 |  |  JOIN BUILD
 |  |  |  join-table-id=12 plan-id=13 cohort-id=02
 |  |  |  build expressions: hd2.hd_demo_sk
 |  |  |  runtime filters: RF067[min_max] <- hd2.hd_demo_sk
-|  |  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=7200
+|  |  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=7200
 |  |  |
 |  |  116:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=68.25KB mem-reservation=0B thread-reservation=0
@@ -2977,13 +2977,13 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  in pipelines: 40(GETNEXT), 53(OPEN)
 |  |
 |  |--F67:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=15.57MB mem-reservation=15.50MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=13.63MB mem-reservation=13.56MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[16760]
 |  |  JOIN BUILD
 |  |  |  join-table-id=13 plan-id=14 cohort-id=02
 |  |  |  build expressions: hd1.hd_demo_sk
 |  |  |  runtime filters: RF069[min_max] <- hd1.hd_demo_sk
-|  |  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=7200
+|  |  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=7200
 |  |  |
 |  |  115:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=68.25KB mem-reservation=0B thread-reservation=0
@@ -3012,7 +3012,7 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  tuple-ids=24,23,43,29,33,39 row-size=234B cardinality=22.46M cost=10025023
 |  |  in pipelines: 40(GETNEXT), 55(OPEN)
 |  |
-|  |--F68:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=80 (adjusted from 120)
+|  |--F68:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=70 (adjusted from 120)
 |  |  |  Per-Instance Resources: mem-estimate=44.80MB mem-reservation=34.00MB thread-reservation=1
 |  |  |  max-parallelism=80 segment-costs=[22017902]
 |  |  JOIN BUILD
@@ -3027,7 +3027,7 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  |  in pipelines: 55(GETNEXT)
 |  |  |
 |  |  F33:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=41.49MB mem-reservation=128.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=38.30MB mem-reservation=128.00KB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[89031849]
 |  |  55:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address ad1, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=1.16MB
@@ -3040,12 +3040,12 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |     in pipelines: 55(GETNEXT)
 |  |
 |  113:EXCHANGE [HASH(ss_addr_sk)]
-|  |  mem-estimate=16.88MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=15.16MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=24,23,43,29,33 row-size=156B cardinality=23.22M cost=22680993
 |  |  in pipelines: 40(GETNEXT)
 |  |
-|  F32:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=40 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=69.42MB mem-reservation=0B thread-reservation=1
+|  F32:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=61.08MB mem-reservation=0B thread-reservation=1
 |  max-parallelism=40 segment-costs=[325063575]
 |  63:HASH JOIN [INNER JOIN, PARTITIONED]
 |  |  hash-table-id=15
@@ -3055,14 +3055,14 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  tuple-ids=24,23,43,29,33 row-size=156B cardinality=23.22M cost=10693595
 |  |  in pipelines: 40(GETNEXT), 49(OPEN)
 |  |
-|  |--F69:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=40 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=46.64MB mem-reservation=34.00MB thread-reservation=1
+|  |--F69:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=58.76MB mem-reservation=34.00MB thread-reservation=1
 |  |  |  max-parallelism=40 segment-costs=[36645000]
 |  |  JOIN BUILD
 |  |  |  join-table-id=15 plan-id=16 cohort-id=02
 |  |  |  build expressions: c_customer_sk
 |  |  |  runtime filters: RF073[min_max] <- c_customer_sk
-|  |  |  mem-estimate=36.37MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
+|  |  |  mem-estimate=48.49MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
 |  |  |
 |  |  112:EXCHANGE [HASH(c_customer_sk)]
 |  |  |  mem-estimate=10.27MB mem-reservation=0B thread-reservation=0
@@ -3070,7 +3070,7 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  |  in pipelines: 49(GETNEXT)
 |  |  |
 |  |  F31:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=20.38MB mem-reservation=1.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=19.28MB mem-reservation=1.00MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[72192000]
 |  |  49:SCAN HDFS [tpcds_partitioned_parquet_snap.customer, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=5.49MB
@@ -3084,12 +3084,12 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |     in pipelines: 49(GETNEXT)
 |  |
 |  111:EXCHANGE [HASH(ss_customer_sk)]
-|  |  mem-estimate=14.34MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=12.90MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=24,23,43,29 row-size=132B cardinality=25.29M cost=20984990
 |  |  in pipelines: 40(GETNEXT)
 |  |
-|  F30:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=30 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=33.63MB mem-reservation=0B thread-reservation=1
+|  F30:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=27.84MB mem-reservation=0B thread-reservation=1
 |  max-parallelism=30 segment-costs=[299440393]
 |  62:HASH JOIN [INNER JOIN, PARTITIONED]
 |  |  hash-table-id=16
@@ -3099,14 +3099,14 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  tuple-ids=24,23,43,29 row-size=132B cardinality=25.29M cost=21190008
 |  |  in pipelines: 40(GETNEXT), 39(OPEN)
 |  |
-|  |--F70:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=30 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=207.29MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
-|  |  |  max-parallelism=30 segment-costs=[63285631] cpu-comparison-result=150 [max(150 (self) vs 25 (sum children))]
+|  |--F70:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=289.68MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
+|  |  |  max-parallelism=30 segment-costs=[63285631] cpu-comparison-result=140 [max(140 (self) vs 25 (sum children))]
 |  |  JOIN BUILD
 |  |  |  join-table-id=16 plan-id=17 cohort-id=02
 |  |  |  build expressions: ss_item_sk, ss_ticket_number
 |  |  |  runtime filters: RF074[bloom] <- ss_item_sk, RF075[bloom] <- ss_ticket_number, RF076[min_max] <- ss_item_sk, RF077[min_max] <- ss_ticket_number
-|  |  |  mem-estimate=164.79MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=36417729
+|  |  |  mem-estimate=247.19MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=36417729
 |  |  |
 |  |  110:EXCHANGE [HASH(ss_item_sk,ss_ticket_number)]
 |  |  |  mem-estimate=25.50MB mem-reservation=0B thread-reservation=0
@@ -3115,7 +3115,7 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |  |
 |  |  F27:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  |  Per-Host Shared Resources: mem-estimate=2.00MB mem-reservation=2.00MB thread-reservation=0 runtime-filters-memory=2.00MB
-|  |  Per-Instance Resources: mem-estimate=31.50MB mem-reservation=8.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=26.33MB mem-reservation=8.00MB thread-reservation=1
 |  |  max-parallelism=180 segment-costs=[1718820654]
 |  |  61:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  |  hash-table-id=17
@@ -3213,7 +3213,7 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  |
 |  F26:PLAN FRAGMENT [RANDOM] hosts=10 instances=30 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=17.00MB mem-reservation=17.00MB thread-reservation=0 runtime-filters-memory=17.00MB
-|  Per-Instance Resources: mem-estimate=17.88MB mem-reservation=512.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=17.25MB mem-reservation=512.00KB thread-reservation=1
 |  max-parallelism=30 segment-costs=[232690522]
 |  40:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -3233,8 +3233,8 @@ max-parallelism=1460 segment-costs=[14553075383, 7852642112] cpu-comparison-resu
 |  in pipelines: 106(GETNEXT)
 |
 F25:PLAN FRAGMENT [HASH(i_product_name,i_item_sk,s_store_name,s_zip,ad1.ca_street_number,ad1.ca_street_name,ad1.ca_city,ad1.ca_zip,ad2.ca_street_number,ad2.ca_street_name,ad2.ca_city,ad2.ca_zip,d1.d_year,d2.d_year,d3.d_year)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=648.46MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=1650 segment-costs=[6517498108, 16408784776] cpu-comparison-result=788 [max(120 (self) vs 788 (sum children))]
+Per-Instance Resources: mem-estimate=637.09MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=1650 segment-costs=[6517498108, 16408784776] cpu-comparison-result=758 [max(120 (self) vs 758 (sum children))]
 106:AGGREGATE [FINALIZE]
 |  output: count:merge(*), sum:merge(ss_wholesale_cost), sum:merge(ss_list_price), sum:merge(ss_coupon_amt)
 |  group by: i_product_name, i_item_sk, s_store_name, s_zip, ad1.ca_street_number, ad1.ca_street_name, ad1.ca_city, ad1.ca_zip, ad2.ca_street_number, ad2.ca_street_name, ad2.ca_city, ad2.ca_zip, d1.d_year, d2.d_year, d3.d_year
@@ -3248,8 +3248,8 @@ max-parallelism=1650 segment-costs=[6517498108, 16408784776] cpu-comparison-resu
 |  in pipelines: 01(GETNEXT)
 |
 F18:PLAN FRAGMENT [HASH(c_current_addr_sk)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=689.42MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=1650 segment-costs=[5515620261, 16408784776] cpu-comparison-result=788 [max(300 (self) vs 788 (sum children))]
+Per-Instance Resources: mem-estimate=685.54MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=1650 segment-costs=[5515620261, 16408784776] cpu-comparison-result=758 [max(270 (self) vs 758 (sum children))]
 38:AGGREGATE [STREAMING]
 |  output: count(*), sum(ss_wholesale_cost), sum(ss_list_price), sum(ss_coupon_amt)
 |  group by: i_product_name, i_item_sk, s_store_name, s_zip, ad1.ca_street_number, ad1.ca_street_name, ad1.ca_city, ad1.ca_zip, ad2.ca_street_number, ad2.ca_street_name, ad2.ca_city, ad2.ca_zip, d1.d_year, d2.d_year, d3.d_year
@@ -3469,12 +3469,12 @@ max-parallelism=1650 segment-costs=[5515620261, 16408784776] cpu-comparison-resu
 |     in pipelines: 17(GETNEXT)
 |
 96:EXCHANGE [HASH(c_current_addr_sk)]
-|  mem-estimate=40.99MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=37.12MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=1,0,20,6,10,16,14,15,11,12,7,8,9,13 row-size=341B cardinality=20.88M cost=45040238
 |  in pipelines: 01(GETNEXT)
 |
-F08:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=80 (adjusted from 120)
-Per-Instance Resources: mem-estimate=202.85MB mem-reservation=0B thread-reservation=1
+F08:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=70 (adjusted from 120)
+Per-Instance Resources: mem-estimate=201.13MB mem-reservation=0B thread-reservation=1
 max-parallelism=80 segment-costs=[715872955]
 33:HASH JOIN [INNER JOIN, BROADCAST]
 |  hash-table-id=24
@@ -3485,13 +3485,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 13(OPEN)
 |
 |--F78:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=15.52MB mem-reservation=15.50MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=13.58MB mem-reservation=13.56MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[4190]
 |  JOIN BUILD
 |  |  join-table-id=24 plan-id=25 cohort-id=01
 |  |  build expressions: p_promo_sk
 |  |  runtime filters: RF015[min_max] <- p_promo_sk
-|  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=1800
+|  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=1800
 |  |
 |  95:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -3520,13 +3520,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 09(OPEN)
 |
 |--F79:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=15.59MB mem-reservation=15.50MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=13.65MB mem-reservation=13.56MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[3140]
 |  JOIN BUILD
 |  |  join-table-id=25 plan-id=26 cohort-id=01
 |  |  build expressions: s_store_sk
 |  |  runtime filters: RF017[min_max] <- s_store_sk
-|  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=1350
+|  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=1350
 |  |
 |  94:EXCHANGE [BROADCAST]
 |  |  mem-estimate=89.64KB mem-reservation=0B thread-reservation=0
@@ -3556,13 +3556,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 08(OPEN)
 |
 |--F80:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=38.57MB mem-reservation=38.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=33.82MB mem-reservation=33.25MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[170129]
 |  JOIN BUILD
 |  |  join-table-id=26 plan-id=27 cohort-id=01
 |  |  build expressions: d3.d_date_sk
 |  |  runtime filters: RF019[min_max] <- d3.d_date_sk
-|  |  mem-estimate=38.00MB mem-reservation=38.00MB spill-buffer=256.00KB thread-reservation=0 cost=73049
+|  |  mem-estimate=33.25MB mem-reservation=33.25MB spill-buffer=256.00KB thread-reservation=0 cost=73049
 |  |
 |  93:EXCHANGE [BROADCAST]
 |  |  mem-estimate=582.70KB mem-reservation=0B thread-reservation=0
@@ -3591,13 +3591,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 07(OPEN)
 |
 |--F81:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=38.57MB mem-reservation=38.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=33.82MB mem-reservation=33.25MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[170129]
 |  JOIN BUILD
 |  |  join-table-id=27 plan-id=28 cohort-id=01
 |  |  build expressions: d2.d_date_sk
 |  |  runtime filters: RF021[min_max] <- d2.d_date_sk
-|  |  mem-estimate=38.00MB mem-reservation=38.00MB spill-buffer=256.00KB thread-reservation=0 cost=73049
+|  |  mem-estimate=33.25MB mem-reservation=33.25MB spill-buffer=256.00KB thread-reservation=0 cost=73049
 |  |
 |  92:EXCHANGE [BROADCAST]
 |  |  mem-estimate=582.70KB mem-reservation=0B thread-reservation=0
@@ -3627,13 +3627,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 12(OPEN)
 |
 |--F82:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=282.21MB mem-reservation=272.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=248.21MB mem-reservation=238.00MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[4473540]
 |  JOIN BUILD
 |  |  join-table-id=28 plan-id=29 cohort-id=01
 |  |  build expressions: cd2.cd_demo_sk
 |  |  runtime filters: RF023[min_max] <- cd2.cd_demo_sk
-|  |  mem-estimate=272.00MB mem-reservation=272.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
+|  |  mem-estimate=238.00MB mem-reservation=238.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
 |  |
 |  91:EXCHANGE [BROADCAST]
 |  |  mem-estimate=10.21MB mem-reservation=0B thread-reservation=0
@@ -3662,13 +3662,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 11(OPEN)
 |
 |--F83:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=282.21MB mem-reservation=272.00MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=248.21MB mem-reservation=238.00MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[4473540]
 |  JOIN BUILD
 |  |  join-table-id=29 plan-id=30 cohort-id=01
 |  |  build expressions: cd1.cd_demo_sk
 |  |  runtime filters: RF025[min_max] <- cd1.cd_demo_sk
-|  |  mem-estimate=272.00MB mem-reservation=272.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
+|  |  mem-estimate=238.00MB mem-reservation=238.00MB spill-buffer=2.00MB thread-reservation=0 cost=1920800
 |  |
 |  90:EXCHANGE [BROADCAST]
 |  |  mem-estimate=10.21MB mem-reservation=0B thread-reservation=0
@@ -3697,13 +3697,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 15(OPEN)
 |
 |--F84:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=15.57MB mem-reservation=15.50MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=13.63MB mem-reservation=13.56MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[16760]
 |  JOIN BUILD
 |  |  join-table-id=30 plan-id=31 cohort-id=01
 |  |  build expressions: hd2.hd_demo_sk
 |  |  runtime filters: RF027[min_max] <- hd2.hd_demo_sk
-|  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=7200
+|  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=7200
 |  |
 |  89:EXCHANGE [BROADCAST]
 |  |  mem-estimate=68.25KB mem-reservation=0B thread-reservation=0
@@ -3733,13 +3733,13 @@ max-parallelism=80 segment-costs=[715872955]
 |  in pipelines: 01(GETNEXT), 14(OPEN)
 |
 |--F85:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=15.57MB mem-reservation=15.50MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=13.63MB mem-reservation=13.56MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[16760]
 |  JOIN BUILD
 |  |  join-table-id=31 plan-id=32 cohort-id=01
 |  |  build expressions: hd1.hd_demo_sk
 |  |  runtime filters: RF029[min_max] <- hd1.hd_demo_sk
-|  |  mem-estimate=15.50MB mem-reservation=15.50MB spill-buffer=64.00KB thread-reservation=0 cost=7200
+|  |  mem-estimate=13.56MB mem-reservation=13.56MB spill-buffer=64.00KB thread-reservation=0 cost=7200
 |  |
 |  88:EXCHANGE [BROADCAST]
 |  |  mem-estimate=68.25KB mem-reservation=0B thread-reservation=0
@@ -3768,7 +3768,7 @@ max-parallelism=80 segment-costs=[715872955]
 |  tuple-ids=1,0,20,6,10,16 row-size=234B cardinality=22.46M cost=10025023
 |  in pipelines: 01(GETNEXT), 16(OPEN)
 |
-|--F86:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=80 (adjusted from 120)
+|--F86:PLAN FRAGMENT [HASH(ss_addr_sk)] hosts=10 instances=70 (adjusted from 120)
 |  |  Per-Instance Resources: mem-estimate=44.80MB mem-reservation=34.00MB thread-reservation=1
 |  |  max-parallelism=80 segment-costs=[22017902]
 |  JOIN BUILD
@@ -3783,7 +3783,7 @@ max-parallelism=80 segment-costs=[715872955]
 |  |  in pipelines: 16(GETNEXT)
 |  |
 |  F07:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
-|  Per-Instance Resources: mem-estimate=41.49MB mem-reservation=128.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=38.30MB mem-reservation=128.00KB thread-reservation=1
 |  max-parallelism=10 segment-costs=[89031849]
 |  16:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address ad1, RANDOM]
 |     HDFS partitions=1/1 files=1 size=1.16MB
@@ -3796,12 +3796,12 @@ max-parallelism=80 segment-costs=[715872955]
 |     in pipelines: 16(GETNEXT)
 |
 86:EXCHANGE [HASH(ss_addr_sk)]
-|  mem-estimate=16.88MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=15.16MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=1,0,20,6,10 row-size=156B cardinality=23.22M cost=22680993
 |  in pipelines: 01(GETNEXT)
 |
-F06:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=40 (adjusted from 120)
-Per-Instance Resources: mem-estimate=69.42MB mem-reservation=0B thread-reservation=1
+F06:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
+Per-Instance Resources: mem-estimate=61.08MB mem-reservation=0B thread-reservation=1
 max-parallelism=40 segment-costs=[325063575]
 24:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=33
@@ -3811,14 +3811,14 @@ max-parallelism=40 segment-costs=[325063575]
 |  tuple-ids=1,0,20,6,10 row-size=156B cardinality=23.22M cost=10693595
 |  in pipelines: 01(GETNEXT), 10(OPEN)
 |
-|--F87:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=40 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=46.64MB mem-reservation=34.00MB thread-reservation=1
+|--F87:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=30 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=58.76MB mem-reservation=34.00MB thread-reservation=1
 |  |  max-parallelism=40 segment-costs=[36645000]
 |  JOIN BUILD
 |  |  join-table-id=33 plan-id=34 cohort-id=01
 |  |  build expressions: c_customer_sk
 |  |  runtime filters: RF033[min_max] <- c_customer_sk
-|  |  mem-estimate=36.37MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
+|  |  mem-estimate=48.49MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=30000000
 |  |
 |  85:EXCHANGE [HASH(c_customer_sk)]
 |  |  mem-estimate=10.27MB mem-reservation=0B thread-reservation=0
@@ -3826,7 +3826,7 @@ max-parallelism=40 segment-costs=[325063575]
 |  |  in pipelines: 10(GETNEXT)
 |  |
 |  F05:PLAN FRAGMENT [RANDOM] hosts=10 instances=10
-|  Per-Instance Resources: mem-estimate=20.38MB mem-reservation=1.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=19.28MB mem-reservation=1.00MB thread-reservation=1
 |  max-parallelism=10 segment-costs=[72192000]
 |  10:SCAN HDFS [tpcds_partitioned_parquet_snap.customer, RANDOM]
 |     HDFS partitions=1/1 files=1 size=5.49MB
@@ -3840,12 +3840,12 @@ max-parallelism=40 segment-costs=[325063575]
 |     in pipelines: 10(GETNEXT)
 |
 84:EXCHANGE [HASH(ss_customer_sk)]
-|  mem-estimate=14.34MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=12.90MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=1,0,20,6 row-size=132B cardinality=25.29M cost=20984990
 |  in pipelines: 01(GETNEXT)
 |
-F04:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=30 (adjusted from 120)
-Per-Instance Resources: mem-estimate=33.63MB mem-reservation=0B thread-reservation=1
+F04:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
+Per-Instance Resources: mem-estimate=27.84MB mem-reservation=0B thread-reservation=1
 max-parallelism=30 segment-costs=[299440393]
 23:HASH JOIN [INNER JOIN, PARTITIONED]
 |  hash-table-id=34
@@ -3855,14 +3855,14 @@ max-parallelism=30 segment-costs=[299440393]
 |  tuple-ids=1,0,20,6 row-size=132B cardinality=25.29M cost=21190008
 |  in pipelines: 01(GETNEXT), 00(OPEN)
 |
-|--F88:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=30 (adjusted from 120)
-|  |  Per-Instance Resources: mem-estimate=207.29MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
-|  |  max-parallelism=30 segment-costs=[63285631] cpu-comparison-result=150 [max(150 (self) vs 25 (sum children))]
+|--F88:PLAN FRAGMENT [HASH(sr_item_sk,sr_ticket_number)] hosts=10 instances=20 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=289.68MB mem-reservation=51.00MB thread-reservation=1 runtime-filters-memory=17.00MB
+|  |  max-parallelism=30 segment-costs=[63285631] cpu-comparison-result=140 [max(140 (self) vs 25 (sum children))]
 |  JOIN BUILD
 |  |  join-table-id=34 plan-id=35 cohort-id=01
 |  |  build expressions: ss_item_sk, ss_ticket_number
 |  |  runtime filters: RF034[bloom] <- ss_item_sk, RF035[bloom] <- ss_ticket_number, RF036[min_max] <- ss_item_sk, RF037[min_max] <- ss_ticket_number
-|  |  mem-estimate=164.79MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=36417729
+|  |  mem-estimate=247.19MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=36417729
 |  |
 |  83:EXCHANGE [HASH(ss_item_sk,ss_ticket_number)]
 |  |  mem-estimate=25.50MB mem-reservation=0B thread-reservation=0
@@ -3871,7 +3871,7 @@ max-parallelism=30 segment-costs=[299440393]
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=2.00MB mem-reservation=2.00MB thread-reservation=0 runtime-filters-memory=2.00MB
-|  Per-Instance Resources: mem-estimate=31.50MB mem-reservation=8.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=26.33MB mem-reservation=8.00MB thread-reservation=1
 |  max-parallelism=180 segment-costs=[1718820654]
 |  22:HASH JOIN [INNER JOIN, BROADCAST]
 |  |  hash-table-id=35
@@ -3969,7 +3969,7 @@ max-parallelism=30 segment-costs=[299440393]
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=30 (adjusted from 120)
 Per-Host Shared Resources: mem-estimate=17.00MB mem-reservation=17.00MB thread-reservation=0 runtime-filters-memory=17.00MB
-Per-Instance Resources: mem-estimate=17.88MB mem-reservation=512.00KB thread-reservation=1
+Per-Instance Resources: mem-estimate=17.25MB mem-reservation=512.00KB thread-reservation=1
 max-parallelism=30 segment-costs=[232690522]
 01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
    HDFS partitions=2004/2004 files=2004 size=33.63MB
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q67.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q67.test
index 0d246b11f..2e0f609dd 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q67.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q67.test
@@ -190,8 +190,8 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=20B cardinality=8.64G(filtered from 8.64G) cost=2488301335
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=5.58GB Threads=32
-Per-Host Resource Estimates: Memory=281.57GB
+Max Per-Host Resource Reservation: Memory=4.58GB Threads=27
+Per-Host Resource Estimates: Memory=263.88GB
 F06:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=4.10MB mem-reservation=4.00MB thread-reservation=1
 |  max-parallelism=1 segment-costs=[1044] cpu-comparison-result=120 [max(1 (self) vs 120 (sum children))]
@@ -207,7 +207,7 @@ PLAN-ROOT SINK
 |  in pipelines: 12(GETNEXT)
 |
 F05:PLAN FRAGMENT [HASH(CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN i_category WHEN 5 THEN i_category WHEN 6 THEN i_category WHEN 7 THEN i_category WHEN 8 THEN i_category WHEN 9 THEN i_category WHEN 10 THEN i_category WHEN 11 THEN i_category WHEN 12 THEN NULL END)] hosts=10 instances=10 (adjusted from 120)
-Per-Instance Resources: mem-estimate=6.22MB mem-reservation=4.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=5.30MB mem-reservation=4.00MB thread-reservation=1
 max-parallelism=10 segment-costs=[967, 1261, 282] cpu-comparison-result=120 [max(10 (self) vs 120 (sum children))]
 12:TOP-N [LIMIT=100]
 |  order by: i_category ASC, i_class ASC, i_brand ASC, i_product_name ASC, d_year ASC, d_qoy ASC, d_moy ASC, s_store_id ASC, sumsales ASC, rk ASC
@@ -238,13 +238,13 @@ max-parallelism=10 segment-costs=[967, 1261, 282] cpu-comparison-result=120 [max
 |  in pipelines: 19(GETNEXT), 09(OPEN)
 |
 18:EXCHANGE [HASH(CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN i_category WHEN 5 THEN i_category WHEN 6 THEN i_category WHEN 7 THEN i_category WHEN 8 THEN i_category WHEN 9 THEN i_category WHEN 10 THEN i_category WHEN 11 THEN i_category WHEN 12 THEN NULL END)]
-|  mem-estimate=2.20MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=1.28MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=25 row-size=92B cardinality=200 cost=106
 |  in pipelines: 09(GETNEXT)
 |
-F04:PLAN FRAGMENT [HASH(CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN murmur_hash(i_category) WHEN 5 THEN murmur_hash(i_category) WHEN 6 THEN murmur_hash(i_category) WHEN 7 THEN murmur_hash(i_category) WHEN 8 THEN murmur_hash(i_category) WHEN 9 THEN murmur_hash(i_category) WHEN 10 THEN murmur_hash(i_category) WHEN 11 THEN murmur_hash(i_category) WHEN 12 THEN murmur_hash(NULL) END,CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN murmur_hash(i_class) WHEN 5 THEN murmur_hash(i_class) WHE [...]
-Per-Instance Resources: mem-estimate=6.12GB mem-reservation=218.31MB thread-reservation=1
-max-parallelism=86010 segment-costs=[495025606007, 254867019701, 860070630770, 1288] cpu-comparison-result=120 [max(120 (self) vs 120 (sum children))]
+F04:PLAN FRAGMENT [HASH(CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN murmur_hash(i_category) WHEN 5 THEN murmur_hash(i_category) WHEN 6 THEN murmur_hash(i_category) WHEN 7 THEN murmur_hash(i_category) WHEN 8 THEN murmur_hash(i_category) WHEN 9 THEN murmur_hash(i_category) WHEN 10 THEN murmur_hash(i_category) WHEN 11 THEN murmur_hash(i_category) WHEN 12 THEN murmur_hash(NULL) END,CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN murmur_hash(i_class) WHEN 5 THEN murmur_hash(i_class) WHE [...]
+Per-Instance Resources: mem-estimate=8.34GB mem-reservation=226.81MB thread-reservation=1
+max-parallelism=86010 segment-costs=[495025606007, 254867019701, 860070630770, 1288] cpu-comparison-result=120 [max(70 (self) vs 120 (sum children))]
 09:TOP-N
 |  order by: CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN i_category WHEN 5 THEN i_category WHEN 6 THEN i_category WHEN 7 THEN i_category WHEN 8 THEN i_category WHEN 9 THEN i_category WHEN 10 THEN i_category WHEN 11 THEN i_category WHEN 12 THEN NULL END ASC NULLS LAST, aggif(valid_tid(4,5,6,7,8,9,10,11,12) IN (4, 5, 6, 7, 8, 9, 10, 11, 12), CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN sum(coalesce(ss_sales_price * ss_quantity, 0)) WHEN 5 THEN sum(coalesce(ss_sales_price * ss_quan [...]
 |  limit with ties: 200
@@ -256,7 +256,7 @@ max-parallelism=86010 segment-costs=[495025606007, 254867019701, 860070630770, 1
 08:AGGREGATE [FINALIZE]
 |  output: aggif(valid_tid(4,5,6,7,8,9,10,11,12) IN (CAST(4 AS INT), CAST(5 AS INT), CAST(6 AS INT), CAST(7 AS INT), CAST(8 AS INT), CAST(9 AS INT), CAST(10 AS INT), CAST(11 AS INT), CAST(12 AS INT)), CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN CAST(4 AS INT) THEN sum(coalesce(ss_sales_price * ss_quantity, 0)) WHEN CAST(5 AS INT) THEN sum(coalesce(ss_sales_price * ss_quantity, 0)) WHEN CAST(6 AS INT) THEN sum(coalesce(ss_sales_price * ss_quantity, 0)) WHEN CAST(7 AS INT) THEN sum(coalesce( [...]
 |  group by: CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN CAST(4 AS INT) THEN i_category WHEN CAST(5 AS INT) THEN i_category WHEN CAST(6 AS INT) THEN i_category WHEN CAST(7 AS INT) THEN i_category WHEN CAST(8 AS INT) THEN i_category WHEN CAST(9 AS INT) THEN i_category WHEN CAST(10 AS INT) THEN i_category WHEN CAST(11 AS INT) THEN i_category WHEN CAST(12 AS INT) THEN NULL END, CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN CAST(4 AS INT) THEN i_class WHEN CAST(5 AS INT) THEN i_class WHEN CAST(6 A [...]
-|  mem-estimate=649.41MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=748.98MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=13 row-size=92B cardinality=43.18G cost=254867019701
 |  in pipelines: 08(GETNEXT), 17(OPEN)
 |
@@ -288,7 +288,7 @@ max-parallelism=86010 segment-costs=[495025606007, 254867019701, 860070630770, 1
 |  Class 8
 |    output: sum:merge(coalesce(ss_sales_price * ss_quantity, 0))
 |    group by: NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
-|  mem-estimate=5.49GB mem-reservation=184.31MB thread-reservation=0
+|  mem-estimate=7.61GB mem-reservation=192.81MB thread-reservation=0
 |  tuple-ids=4N,5N,6N,7N,8N,9N,10N,11N,12N row-size=1.09KB cardinality=43.18G cost=254867019650
 |  in pipelines: 17(GETNEXT), 00(OPEN)
 |
@@ -299,7 +299,7 @@ max-parallelism=86010 segment-costs=[495025606007, 254867019701, 860070630770, 1
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 Per-Host Shared Resources: mem-estimate=3.00MB mem-reservation=3.00MB thread-reservation=0 runtime-filters-memory=3.00MB
-Per-Instance Resources: mem-estimate=17.30GB mem-reservation=219.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=17.08GB mem-reservation=219.00MB thread-reservation=1
 max-parallelism=1824 segment-costs=[316527805946, 3317305650347] cpu-comparison-result=120 [max(120 (self) vs 36 (sum children))]
 07:AGGREGATE [STREAMING]
 |  Class 0
@@ -453,8 +453,8 @@ max-parallelism=1824 segment-costs=[316527805946, 3317305650347] cpu-comparison-
    tuple-ids=0 row-size=20B cardinality=8.64G(filtered from 8.64G) cost=2488301335
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=5.58GB Threads=32
-Per-Host Resource Estimates: Memory=281.57GB
+Max Per-Host Resource Reservation: Memory=4.58GB Threads=27
+Per-Host Resource Estimates: Memory=263.88GB
 F06:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=4.10MB mem-reservation=4.00MB thread-reservation=1
 |  max-parallelism=1 segment-costs=[1044] cpu-comparison-result=120 [max(1 (self) vs 120 (sum children))]
@@ -470,7 +470,7 @@ PLAN-ROOT SINK
 |  in pipelines: 12(GETNEXT)
 |
 F05:PLAN FRAGMENT [HASH(CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN i_category WHEN 5 THEN i_category WHEN 6 THEN i_category WHEN 7 THEN i_category WHEN 8 THEN i_category WHEN 9 THEN i_category WHEN 10 THEN i_category WHEN 11 THEN i_category WHEN 12 THEN NULL END)] hosts=10 instances=10 (adjusted from 120)
-Per-Instance Resources: mem-estimate=6.22MB mem-reservation=4.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=5.30MB mem-reservation=4.00MB thread-reservation=1
 max-parallelism=10 segment-costs=[967, 1261, 282] cpu-comparison-result=120 [max(10 (self) vs 120 (sum children))]
 12:TOP-N [LIMIT=100]
 |  order by: i_category ASC, i_class ASC, i_brand ASC, i_product_name ASC, d_year ASC, d_qoy ASC, d_moy ASC, s_store_id ASC, sumsales ASC, rk ASC
@@ -501,13 +501,13 @@ max-parallelism=10 segment-costs=[967, 1261, 282] cpu-comparison-result=120 [max
 |  in pipelines: 19(GETNEXT), 09(OPEN)
 |
 18:EXCHANGE [HASH(CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN i_category WHEN 5 THEN i_category WHEN 6 THEN i_category WHEN 7 THEN i_category WHEN 8 THEN i_category WHEN 9 THEN i_category WHEN 10 THEN i_category WHEN 11 THEN i_category WHEN 12 THEN NULL END)]
-|  mem-estimate=2.20MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=1.28MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=25 row-size=92B cardinality=200 cost=106
 |  in pipelines: 09(GETNEXT)
 |
-F04:PLAN FRAGMENT [HASH(CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN murmur_hash(i_category) WHEN 5 THEN murmur_hash(i_category) WHEN 6 THEN murmur_hash(i_category) WHEN 7 THEN murmur_hash(i_category) WHEN 8 THEN murmur_hash(i_category) WHEN 9 THEN murmur_hash(i_category) WHEN 10 THEN murmur_hash(i_category) WHEN 11 THEN murmur_hash(i_category) WHEN 12 THEN murmur_hash(NULL) END,CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN murmur_hash(i_class) WHEN 5 THEN murmur_hash(i_class) WHE [...]
-Per-Instance Resources: mem-estimate=6.12GB mem-reservation=218.31MB thread-reservation=1
-max-parallelism=86010 segment-costs=[495025606007, 254867019701, 860070630770, 1288] cpu-comparison-result=120 [max(120 (self) vs 120 (sum children))]
+F04:PLAN FRAGMENT [HASH(CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN murmur_hash(i_category) WHEN 5 THEN murmur_hash(i_category) WHEN 6 THEN murmur_hash(i_category) WHEN 7 THEN murmur_hash(i_category) WHEN 8 THEN murmur_hash(i_category) WHEN 9 THEN murmur_hash(i_category) WHEN 10 THEN murmur_hash(i_category) WHEN 11 THEN murmur_hash(i_category) WHEN 12 THEN murmur_hash(NULL) END,CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN murmur_hash(i_class) WHEN 5 THEN murmur_hash(i_class) WHE [...]
+Per-Instance Resources: mem-estimate=8.34GB mem-reservation=226.81MB thread-reservation=1
+max-parallelism=86010 segment-costs=[495025606007, 254867019701, 860070630770, 1288] cpu-comparison-result=120 [max(70 (self) vs 120 (sum children))]
 09:TOP-N
 |  order by: CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN i_category WHEN 5 THEN i_category WHEN 6 THEN i_category WHEN 7 THEN i_category WHEN 8 THEN i_category WHEN 9 THEN i_category WHEN 10 THEN i_category WHEN 11 THEN i_category WHEN 12 THEN NULL END ASC NULLS LAST, aggif(valid_tid(4,5,6,7,8,9,10,11,12) IN (4, 5, 6, 7, 8, 9, 10, 11, 12), CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN 4 THEN sum(coalesce(ss_sales_price * ss_quantity, 0)) WHEN 5 THEN sum(coalesce(ss_sales_price * ss_quan [...]
 |  limit with ties: 200
@@ -519,7 +519,7 @@ max-parallelism=86010 segment-costs=[495025606007, 254867019701, 860070630770, 1
 08:AGGREGATE [FINALIZE]
 |  output: aggif(valid_tid(4,5,6,7,8,9,10,11,12) IN (CAST(4 AS INT), CAST(5 AS INT), CAST(6 AS INT), CAST(7 AS INT), CAST(8 AS INT), CAST(9 AS INT), CAST(10 AS INT), CAST(11 AS INT), CAST(12 AS INT)), CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN CAST(4 AS INT) THEN sum(coalesce(ss_sales_price * ss_quantity, 0)) WHEN CAST(5 AS INT) THEN sum(coalesce(ss_sales_price * ss_quantity, 0)) WHEN CAST(6 AS INT) THEN sum(coalesce(ss_sales_price * ss_quantity, 0)) WHEN CAST(7 AS INT) THEN sum(coalesce( [...]
 |  group by: CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN CAST(4 AS INT) THEN i_category WHEN CAST(5 AS INT) THEN i_category WHEN CAST(6 AS INT) THEN i_category WHEN CAST(7 AS INT) THEN i_category WHEN CAST(8 AS INT) THEN i_category WHEN CAST(9 AS INT) THEN i_category WHEN CAST(10 AS INT) THEN i_category WHEN CAST(11 AS INT) THEN i_category WHEN CAST(12 AS INT) THEN NULL END, CASE valid_tid(4,5,6,7,8,9,10,11,12) WHEN CAST(4 AS INT) THEN i_class WHEN CAST(5 AS INT) THEN i_class WHEN CAST(6 A [...]
-|  mem-estimate=649.41MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=748.98MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=13 row-size=92B cardinality=43.18G cost=254867019701
 |  in pipelines: 08(GETNEXT), 17(OPEN)
 |
@@ -551,7 +551,7 @@ max-parallelism=86010 segment-costs=[495025606007, 254867019701, 860070630770, 1
 |  Class 8
 |    output: sum:merge(coalesce(ss_sales_price * ss_quantity, 0))
 |    group by: NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
-|  mem-estimate=5.49GB mem-reservation=184.31MB thread-reservation=0
+|  mem-estimate=7.61GB mem-reservation=192.81MB thread-reservation=0
 |  tuple-ids=4N,5N,6N,7N,8N,9N,10N,11N,12N row-size=1.09KB cardinality=43.18G cost=254867019650
 |  in pipelines: 17(GETNEXT), 00(OPEN)
 |
@@ -562,7 +562,7 @@ max-parallelism=86010 segment-costs=[495025606007, 254867019701, 860070630770, 1
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 Per-Host Shared Resources: mem-estimate=3.00MB mem-reservation=3.00MB thread-reservation=0 runtime-filters-memory=3.00MB
-Per-Instance Resources: mem-estimate=17.30GB mem-reservation=219.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=17.08GB mem-reservation=219.00MB thread-reservation=1
 max-parallelism=1824 segment-costs=[316527805946, 3317305650347] cpu-comparison-result=120 [max(120 (self) vs 36 (sum children))]
 07:AGGREGATE [STREAMING]
 |  Class 0
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q80.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q80.test
index 536ee980d..be7b170b6 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q80.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q80.test
@@ -494,11 +494,11 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=32B cardinality=146.84M(filtered from 8.64G) cost=67664334
    in pipelines: 01(GETNEXT)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=1.34GB Threads=126
-Per-Host Resource Estimates: Memory=10.89GB
+Max Per-Host Resource Reservation: Memory=229.12MB Threads=69
+Per-Host Resource Estimates: Memory=8.05GB
 F26:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=4.07MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[539] cpu-comparison-result=671 [max(1 (self) vs 671 (sum children))]
+|  max-parallelism=1 segment-costs=[539] cpu-comparison-result=441 [max(1 (self) vs 441 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: CASE valid_tid(26,27,28) WHEN 26 THEN channel WHEN 27 THEN channel WHEN 28 THEN NULL END, CASE valid_tid(26,27,28) WHEN 26 THEN id WHEN 27 THEN NULL WHEN 28 THEN NULL END, aggif(valid_tid(26,27,28) IN (26, 27, 28), CASE valid_tid(26,27,28) WHEN 26 THEN sum(sales) WHEN 27 THEN sum(sales) WHEN 28 THEN sum(sales) END), aggif(valid_tid(26,27,28) IN (26, 27, 28), CASE valid_tid(26,27,28) WHEN 26 THEN sum(`returns`) WHEN 27 THEN sum(`returns`) WHEN 28 THEN sum(`returns`) END), [...]
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=500
@@ -511,8 +511,8 @@ PLAN-ROOT SINK
 |  in pipelines: 39(GETNEXT)
 |
 F25:PLAN FRAGMENT [HASH(CASE valid_tid(26,27,28) WHEN 26 THEN murmur_hash(channel) WHEN 27 THEN murmur_hash(channel) WHEN 28 THEN murmur_hash(NULL) END,CASE valid_tid(26,27,28) WHEN 26 THEN murmur_hash(id) WHEN 27 THEN murmur_hash(NULL) WHEN 28 THEN murmur_hash(NULL) END)] hosts=10 instances=10 (adjusted from 120)
-Per-Instance Resources: mem-estimate=57.48MB mem-reservation=7.75MB thread-reservation=1
-max-parallelism=10 segment-costs=[265114, 221854, 313895, 220] cpu-comparison-result=671 [max(10 (self) vs 671 (sum children))]
+Per-Instance Resources: mem-estimate=40.00MB mem-reservation=7.75MB thread-reservation=1
+max-parallelism=10 segment-costs=[265114, 221854, 313895, 220] cpu-comparison-result=441 [max(10 (self) vs 441 (sum children))]
 39:TOP-N [LIMIT=100]
 |  order by: CASE valid_tid(26,27,28) WHEN 26 THEN channel WHEN 27 THEN channel WHEN 28 THEN NULL END ASC, CASE valid_tid(26,27,28) WHEN 26 THEN id WHEN 27 THEN NULL WHEN 28 THEN NULL END ASC
 |  mem-estimate=7.03KB mem-reservation=0B thread-reservation=0
@@ -541,13 +541,13 @@ max-parallelism=10 segment-costs=[265114, 221854, 313895, 220] cpu-comparison-re
 |  in pipelines: 65(GETNEXT), 47(OPEN), 55(OPEN), 63(OPEN)
 |
 64:EXCHANGE [HASH(CASE valid_tid(26,27,28) WHEN 26 THEN murmur_hash(channel) WHEN 27 THEN murmur_hash(channel) WHEN 28 THEN murmur_hash(NULL) END,CASE valid_tid(26,27,28) WHEN 26 THEN murmur_hash(id) WHEN 27 THEN murmur_hash(NULL) WHEN 28 THEN murmur_hash(NULL) END)]
-|  mem-estimate=27.48MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=2.98MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=26N,27N,28N row-size=216B cardinality=36.72K cost=43261
 |  in pipelines: 47(GETNEXT), 55(GETNEXT), 63(GETNEXT)
 |
-F24:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=56.20MB mem-reservation=7.94MB thread-reservation=1
-max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-comparison-result=671 [max(120 (self) vs 671 (sum children))]
+F24:PLAN FRAGMENT [RANDOM] hosts=10 instances=10 (adjusted from 120)
+Per-Instance Resources: mem-estimate=49.95MB mem-reservation=7.94MB thread-reservation=1
+max-parallelism=10 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-comparison-result=441 [max(10 (self) vs 441 (sum children))]
 37:AGGREGATE [STREAMING]
 |  Class 0
 |    output: sum(sales), sum(returns), sum(profit)
@@ -575,13 +575,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 63(GETNEXT), 25(OPEN)
 |  |
 |  62:EXCHANGE [HASH(web_site_id)]
-|  |  mem-estimate=129.15KB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=26.03KB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=22 row-size=76B cardinality=33 cost=15
 |  |  in pipelines: 25(GETNEXT)
 |  |
-|  F18:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=50 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=58.20MB mem-reservation=2.00MB thread-reservation=1
-|  max-parallelism=50 segment-costs=[441159182, 178] cpu-comparison-result=147 [max(70 (self) vs 147 (sum children))]
+|  F18:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=10 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=23.83MB mem-reservation=2.00MB thread-reservation=1
+|  max-parallelism=50 segment-costs=[441159182, 178] cpu-comparison-result=107 [max(30 (self) vs 107 (sum children))]
 |  36:AGGREGATE [STREAMING]
 |  |  output: sum(ws_ext_sales_price), sum(coalesce(wr_return_amt, CAST(0 AS DECIMAL(7,2)))), sum(ws_net_profit - coalesce(wr_net_loss, CAST(0 AS DECIMAL(7,2))))
 |  |  group by: web_site_id
@@ -598,13 +598,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 25(GETNEXT), 30(OPEN)
 |  |
 |  |--F37:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=10.74MB mem-reservation=10.69MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.99MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[4139]
 |  |  JOIN BUILD
 |  |  |  join-table-id=10 plan-id=11 cohort-id=03
 |  |  |  build expressions: p_promo_sk
 |  |  |  runtime filters: RF016[bloom] <- p_promo_sk, RF017[min_max] <- p_promo_sk
-|  |  |  mem-estimate=9.69MB mem-reservation=9.69MB spill-buffer=64.00KB thread-reservation=0 cost=1779
+|  |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=1779
 |  |  |
 |  |  61:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=50.53KB mem-reservation=0B thread-reservation=0
@@ -636,13 +636,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 25(GETNEXT), 28(OPEN)
 |  |
 |  |--F38:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=10.70MB mem-reservation=10.69MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[146]
 |  |  JOIN BUILD
 |  |  |  join-table-id=11 plan-id=12 cohort-id=03
 |  |  |  build expressions: web_site_sk
 |  |  |  runtime filters: RF018[bloom] <- web_site_sk, RF019[min_max] <- web_site_sk
-|  |  |  mem-estimate=9.69MB mem-reservation=9.69MB spill-buffer=64.00KB thread-reservation=0 cost=66
+|  |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=66
 |  |  |
 |  |  60:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -671,13 +671,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 25(GETNEXT), 29(OPEN)
 |  |
 |  |--F39:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=15.70MB mem-reservation=15.38MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=4.20MB mem-reservation=3.88MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[83840]
 |  |  JOIN BUILD
 |  |  |  join-table-id=12 plan-id=13 cohort-id=03
 |  |  |  build expressions: i_item_sk
 |  |  |  runtime filters: RF020[bloom] <- i_item_sk, RF021[min_max] <- i_item_sk
-|  |  |  mem-estimate=14.38MB mem-reservation=14.38MB spill-buffer=128.00KB thread-reservation=0 cost=36000
+|  |  |  mem-estimate=2.88MB mem-reservation=2.88MB spill-buffer=128.00KB thread-reservation=0 cost=36000
 |  |  |
 |  |  59:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=329.25KB mem-reservation=0B thread-reservation=0
@@ -709,13 +709,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 25(GETNEXT), 27(OPEN)
 |  |
 |  |--F40:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=10.70MB mem-reservation=10.69MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[71]
 |  |  JOIN BUILD
 |  |  |  join-table-id=13 plan-id=14 cohort-id=03
 |  |  |  build expressions: d_date_sk
 |  |  |  runtime filters: RF022[bloom] <- d_date_sk
-|  |  |  mem-estimate=9.69MB mem-reservation=9.69MB spill-buffer=64.00KB thread-reservation=0 cost=31
+|  |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=31
 |  |  |
 |  |  58:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -746,13 +746,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  tuple-ids=16,17N row-size=52B cardinality=36.71M(filtered from 2.16G) cost=400802306
 |  |  in pipelines: 25(GETNEXT), 26(OPEN)
 |  |
-|  |--F41:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=50 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=216.45MB mem-reservation=34.00MB thread-reservation=1
+|  |--F41:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=1.01GB mem-reservation=34.00MB thread-reservation=1
 |  |  |  max-parallelism=50 segment-costs=[259872831]
 |  |  JOIN BUILD
 |  |  |  join-table-id=14 plan-id=15 cohort-id=03
 |  |  |  build expressions: wr_item_sk, wr_order_number
-|  |  |  mem-estimate=205.28MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=216002686
+|  |  |  mem-estimate=1.00GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=216002686
 |  |  |
 |  |  57:EXCHANGE [HASH(wr_item_sk,wr_order_number)]
 |  |  |  mem-estimate=11.17MB mem-reservation=0B thread-reservation=0
@@ -761,7 +761,7 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  |
 |  |  F17:PLAN FRAGMENT [RANDOM] hosts=10 instances=50 (adjusted from 120)
 |  |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  |  Per-Instance Resources: mem-estimate=20.69MB mem-reservation=256.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=16.94MB mem-reservation=256.00KB thread-reservation=1
 |  |  max-parallelism=50 segment-costs=[451704816]
 |  |  26:SCAN HDFS [tpcds_partitioned_parquet_snap.web_returns, RANDOM]
 |  |     HDFS partitions=2114/2114 files=2114 size=20.70MB
@@ -782,7 +782,7 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |
 |  F16:PLAN FRAGMENT [RANDOM] hosts=10 instances=20 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=4.00MB mem-reservation=4.00MB thread-reservation=0 runtime-filters-memory=4.00MB
-|  Per-Instance Resources: mem-estimate=23.03MB mem-reservation=128.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=17.41MB mem-reservation=128.00KB thread-reservation=1
 |  max-parallelism=20 segment-costs=[111480872]
 |  25:SCAN HDFS [tpcds_partitioned_parquet_snap.web_sales, RANDOM]
 |     HDFS partitions=1824/1824 files=1824 size=84.18MB
@@ -804,13 +804,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 55(GETNEXT), 13(OPEN)
 |  |
 |  54:EXCHANGE [HASH(cp_catalog_page_id)]
-|  |  mem-estimate=7.29MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=1.04MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=14 row-size=76B cardinality=36.00K cost=16585
 |  |  in pipelines: 13(GETNEXT)
 |  |
-|  F10:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=90 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=58.55MB mem-reservation=5.00MB thread-reservation=1
-|  max-parallelism=90 segment-costs=[891170974, 194745] cpu-comparison-result=237 [max(120 (self) vs 237 (sum children))]
+|  F10:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=24.18MB mem-reservation=5.00MB thread-reservation=1
+|  max-parallelism=90 segment-costs=[891170974, 194745] cpu-comparison-result=157 [max(40 (self) vs 157 (sum children))]
 |  24:AGGREGATE [STREAMING]
 |  |  output: sum(cs_ext_sales_price), sum(coalesce(cr_return_amount, CAST(0 AS DECIMAL(7,2)))), sum(cs_net_profit - coalesce(cr_net_loss, CAST(0 AS DECIMAL(7,2))))
 |  |  group by: cp_catalog_page_id
@@ -827,13 +827,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 13(GETNEXT), 16(OPEN)
 |  |
 |  |--F32:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=27.01MB mem-reservation=25.88MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=4.01MB mem-reservation=2.88MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[83840]
 |  |  JOIN BUILD
 |  |  |  join-table-id=05 plan-id=06 cohort-id=02
 |  |  |  build expressions: cp_catalog_page_sk
 |  |  |  runtime filters: RF009[min_max] <- cp_catalog_page_sk
-|  |  |  mem-estimate=25.88MB mem-reservation=25.88MB spill-buffer=128.00KB thread-reservation=0 cost=36000
+|  |  |  mem-estimate=2.88MB mem-reservation=2.88MB spill-buffer=128.00KB thread-reservation=0 cost=36000
 |  |  |
 |  |  53:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=1.13MB mem-reservation=0B thread-reservation=0
@@ -862,13 +862,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 13(GETNEXT), 18(OPEN)
 |  |
 |  |--F33:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=18.49MB mem-reservation=18.44MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.99MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[4139]
 |  |  JOIN BUILD
 |  |  |  join-table-id=06 plan-id=07 cohort-id=02
 |  |  |  build expressions: p_promo_sk
 |  |  |  runtime filters: RF010[bloom] <- p_promo_sk, RF011[min_max] <- p_promo_sk
-|  |  |  mem-estimate=17.44MB mem-reservation=17.44MB spill-buffer=64.00KB thread-reservation=0 cost=1779
+|  |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=1779
 |  |  |
 |  |  52:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=50.53KB mem-reservation=0B thread-reservation=0
@@ -900,13 +900,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 13(GETNEXT), 17(OPEN)
 |  |
 |  |--F34:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=27.20MB mem-reservation=26.88MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=4.20MB mem-reservation=3.88MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[83840]
 |  |  JOIN BUILD
 |  |  |  join-table-id=07 plan-id=08 cohort-id=02
 |  |  |  build expressions: i_item_sk
 |  |  |  runtime filters: RF012[bloom] <- i_item_sk, RF013[min_max] <- i_item_sk
-|  |  |  mem-estimate=25.88MB mem-reservation=25.88MB spill-buffer=128.00KB thread-reservation=0 cost=36000
+|  |  |  mem-estimate=2.88MB mem-reservation=2.88MB spill-buffer=128.00KB thread-reservation=0 cost=36000
 |  |  |
 |  |  51:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=329.25KB mem-reservation=0B thread-reservation=0
@@ -938,13 +938,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 13(GETNEXT), 15(OPEN)
 |  |
 |  |--F35:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=18.45MB mem-reservation=18.44MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[71]
 |  |  JOIN BUILD
 |  |  |  join-table-id=08 plan-id=09 cohort-id=02
 |  |  |  build expressions: d_date_sk
 |  |  |  runtime filters: RF014[bloom] <- d_date_sk
-|  |  |  mem-estimate=17.44MB mem-reservation=17.44MB spill-buffer=64.00KB thread-reservation=0 cost=31
+|  |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=31
 |  |  |
 |  |  50:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -975,13 +975,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  tuple-ids=8,9N row-size=52B cardinality=73.14M(filtered from 4.32G) cost=801558970
 |  |  in pipelines: 13(GETNEXT), 14(OPEN)
 |  |
-|  |--F36:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=90 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=240.43MB mem-reservation=34.00MB thread-reservation=1
+|  |--F36:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=2.02GB mem-reservation=34.00MB thread-reservation=1
 |  |  |  max-parallelism=90 segment-costs=[519759641]
 |  |  JOIN BUILD
 |  |  |  join-table-id=09 plan-id=10 cohort-id=02
 |  |  |  build expressions: cr_item_sk, cr_order_number
-|  |  |  mem-estimate=228.09MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=432016991
+|  |  |  mem-estimate=2.00GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=432016991
 |  |  |
 |  |  49:EXCHANGE [HASH(cr_item_sk,cr_order_number)]
 |  |  |  mem-estimate=12.34MB mem-reservation=0B thread-reservation=0
@@ -990,7 +990,7 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  |
 |  |  F09:PLAN FRAGMENT [RANDOM] hosts=10 instances=100 (adjusted from 120)
 |  |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  |  Per-Instance Resources: mem-estimate=24.44MB mem-reservation=32.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=16.94MB mem-reservation=32.00KB thread-reservation=1
 |  |  max-parallelism=100 segment-costs=[903433931]
 |  |  14:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_returns, RANDOM]
 |  |     HDFS partitions=2060/2060 files=2060 size=30.47MB
@@ -1011,7 +1011,7 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |
 |  F08:PLAN FRAGMENT [RANDOM] hosts=10 instances=30 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=3.00MB mem-reservation=3.00MB thread-reservation=0 runtime-filters-memory=3.00MB
-|  Per-Instance Resources: mem-estimate=28.66MB mem-reservation=1.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=17.41MB mem-reservation=1.00MB thread-reservation=1
 |  max-parallelism=30 segment-costs=[222116656]
 |  13:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_sales, RANDOM]
 |     HDFS partitions=1831/1831 files=1831 size=150.82MB
@@ -1033,13 +1033,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  in pipelines: 47(GETNEXT), 01(OPEN)
 |
 46:EXCHANGE [HASH(s_store_id)]
-|  mem-estimate=6.21MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=534.72KB mem-reservation=0B thread-reservation=0
 |  tuple-ids=6 row-size=76B cardinality=678 cost=312
 |  in pipelines: 01(GETNEXT)
 |
-F02:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=58.62MB mem-reservation=2.00MB thread-reservation=1
-max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [max(152 (self) vs 287 (sum children))]
+F02:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+Per-Instance Resources: mem-estimate=24.25MB mem-reservation=2.00MB thread-reservation=1
+max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=177 [max(42 (self) vs 177 (sum children))]
 12:AGGREGATE [STREAMING]
 |  output: sum(ss_ext_sales_price), sum(coalesce(sr_return_amt, CAST(0 AS DECIMAL(7,2)))), sum(ss_net_profit - coalesce(sr_net_loss, CAST(0 AS DECIMAL(7,2))))
 |  group by: s_store_id
@@ -1056,13 +1056,13 @@ max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [
 |  in pipelines: 01(GETNEXT), 04(OPEN)
 |
 |--F27:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=23.33MB mem-reservation=23.25MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=2.01MB mem-reservation=1.94MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[3140]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: s_store_sk
 |  |  runtime filters: RF001[min_max] <- s_store_sk
-|  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=1350
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=1350
 |  |
 |  45:EXCHANGE [BROADCAST]
 |  |  mem-estimate=78.19KB mem-reservation=0B thread-reservation=0
@@ -1091,13 +1091,13 @@ max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [
 |  in pipelines: 01(GETNEXT), 06(OPEN)
 |
 |--F28:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=24.30MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=2.99MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[4139]
 |  JOIN BUILD
 |  |  join-table-id=01 plan-id=02 cohort-id=01
 |  |  build expressions: p_promo_sk
 |  |  runtime filters: RF002[bloom] <- p_promo_sk, RF003[min_max] <- p_promo_sk
-|  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=1779
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=1779
 |  |
 |  44:EXCHANGE [BROADCAST]
 |  |  mem-estimate=50.53KB mem-reservation=0B thread-reservation=0
@@ -1129,13 +1129,13 @@ max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [
 |  in pipelines: 01(GETNEXT), 05(OPEN)
 |
 |--F29:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=35.82MB mem-reservation=35.50MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=4.20MB mem-reservation=3.88MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[83840]
 |  JOIN BUILD
 |  |  join-table-id=02 plan-id=03 cohort-id=01
 |  |  build expressions: i_item_sk
 |  |  runtime filters: RF004[bloom] <- i_item_sk, RF005[min_max] <- i_item_sk
-|  |  mem-estimate=34.50MB mem-reservation=34.50MB spill-buffer=128.00KB thread-reservation=0 cost=36000
+|  |  mem-estimate=2.88MB mem-reservation=2.88MB spill-buffer=128.00KB thread-reservation=0 cost=36000
 |  |
 |  43:EXCHANGE [BROADCAST]
 |  |  mem-estimate=329.25KB mem-reservation=0B thread-reservation=0
@@ -1167,13 +1167,13 @@ max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [
 |  in pipelines: 01(GETNEXT), 03(OPEN)
 |
 |--F30:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=24.27MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[71]
 |  JOIN BUILD
 |  |  join-table-id=03 plan-id=04 cohort-id=01
 |  |  build expressions: d_date_sk
 |  |  runtime filters: RF006[bloom] <- d_date_sk
-|  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=31
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=31
 |  |
 |  42:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -1204,13 +1204,13 @@ max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [
 |  tuple-ids=0,1N row-size=52B cardinality=146.84M(filtered from 8.64G) cost=1603220974
 |  in pipelines: 01(GETNEXT), 02(OPEN)
 |
-|--F31:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  |  Per-Instance Resources: mem-estimate=354.94MB mem-reservation=34.00MB thread-reservation=1
+|--F31:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=4.02GB mem-reservation=34.00MB thread-reservation=1
 |  |  max-parallelism=180 segment-costs=[1039464723]
 |  JOIN BUILD
 |  |  join-table-id=04 plan-id=05 cohort-id=01
 |  |  build expressions: sr_item_sk, sr_ticket_number
-|  |  mem-estimate=342.13MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
+|  |  mem-estimate=4.01GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
 |  |
 |  41:EXCHANGE [HASH(sr_item_sk,sr_ticket_number)]
 |  |  mem-estimate=12.81MB mem-reservation=0B thread-reservation=0
@@ -1219,7 +1219,7 @@ max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  Per-Instance Resources: mem-estimate=27.25MB mem-reservation=512.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=16.94MB mem-reservation=512.00KB thread-reservation=1
 |  max-parallelism=190 segment-costs=[1806773027]
 |  02:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -1240,7 +1240,7 @@ max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=32 (adjusted from 120)
 Per-Host Shared Resources: mem-estimate=3.00MB mem-reservation=3.00MB thread-reservation=0 runtime-filters-memory=3.00MB
-Per-Instance Resources: mem-estimate=32.88MB mem-reservation=8.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=17.41MB mem-reservation=8.00MB thread-reservation=1
 max-parallelism=32 segment-costs=[445926760]
 01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_sales, RANDOM]
    HDFS partitions=1824/1824 files=1824 size=199.33MB
@@ -1254,11 +1254,11 @@ max-parallelism=32 segment-costs=[445926760]
    tuple-ids=0 row-size=32B cardinality=146.84M(filtered from 8.64G) cost=67664334
    in pipelines: 01(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=1.34GB Threads=126
-Per-Host Resource Estimates: Memory=10.89GB
+Max Per-Host Resource Reservation: Memory=229.12MB Threads=69
+Per-Host Resource Estimates: Memory=8.05GB
 F26:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=4.07MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[539] cpu-comparison-result=671 [max(1 (self) vs 671 (sum children))]
+|  max-parallelism=1 segment-costs=[539] cpu-comparison-result=441 [max(1 (self) vs 441 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: CASE valid_tid(26,27,28) WHEN 26 THEN channel WHEN 27 THEN channel WHEN 28 THEN NULL END, CASE valid_tid(26,27,28) WHEN 26 THEN id WHEN 27 THEN NULL WHEN 28 THEN NULL END, aggif(valid_tid(26,27,28) IN (26, 27, 28), CASE valid_tid(26,27,28) WHEN 26 THEN sum(sales) WHEN 27 THEN sum(sales) WHEN 28 THEN sum(sales) END), aggif(valid_tid(26,27,28) IN (26, 27, 28), CASE valid_tid(26,27,28) WHEN 26 THEN sum(`returns`) WHEN 27 THEN sum(`returns`) WHEN 28 THEN sum(`returns`) END), [...]
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=500
@@ -1271,8 +1271,8 @@ PLAN-ROOT SINK
 |  in pipelines: 39(GETNEXT)
 |
 F25:PLAN FRAGMENT [HASH(CASE valid_tid(26,27,28) WHEN 26 THEN murmur_hash(channel) WHEN 27 THEN murmur_hash(channel) WHEN 28 THEN murmur_hash(NULL) END,CASE valid_tid(26,27,28) WHEN 26 THEN murmur_hash(id) WHEN 27 THEN murmur_hash(NULL) WHEN 28 THEN murmur_hash(NULL) END)] hosts=10 instances=10 (adjusted from 120)
-Per-Instance Resources: mem-estimate=57.48MB mem-reservation=7.75MB thread-reservation=1
-max-parallelism=10 segment-costs=[265114, 221854, 313895, 220] cpu-comparison-result=671 [max(10 (self) vs 671 (sum children))]
+Per-Instance Resources: mem-estimate=40.00MB mem-reservation=7.75MB thread-reservation=1
+max-parallelism=10 segment-costs=[265114, 221854, 313895, 220] cpu-comparison-result=441 [max(10 (self) vs 441 (sum children))]
 39:TOP-N [LIMIT=100]
 |  order by: CASE valid_tid(26,27,28) WHEN 26 THEN channel WHEN 27 THEN channel WHEN 28 THEN NULL END ASC, CASE valid_tid(26,27,28) WHEN 26 THEN id WHEN 27 THEN NULL WHEN 28 THEN NULL END ASC
 |  mem-estimate=7.03KB mem-reservation=0B thread-reservation=0
@@ -1301,13 +1301,13 @@ max-parallelism=10 segment-costs=[265114, 221854, 313895, 220] cpu-comparison-re
 |  in pipelines: 65(GETNEXT), 47(OPEN), 55(OPEN), 63(OPEN)
 |
 64:EXCHANGE [HASH(CASE valid_tid(26,27,28) WHEN 26 THEN murmur_hash(channel) WHEN 27 THEN murmur_hash(channel) WHEN 28 THEN murmur_hash(NULL) END,CASE valid_tid(26,27,28) WHEN 26 THEN murmur_hash(id) WHEN 27 THEN murmur_hash(NULL) WHEN 28 THEN murmur_hash(NULL) END)]
-|  mem-estimate=27.48MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=2.98MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=26N,27N,28N row-size=216B cardinality=36.72K cost=43261
 |  in pipelines: 47(GETNEXT), 55(GETNEXT), 63(GETNEXT)
 |
-F24:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=56.20MB mem-reservation=7.94MB thread-reservation=1
-max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-comparison-result=671 [max(120 (self) vs 671 (sum children))]
+F24:PLAN FRAGMENT [RANDOM] hosts=10 instances=10 (adjusted from 120)
+Per-Instance Resources: mem-estimate=49.95MB mem-reservation=7.94MB thread-reservation=1
+max-parallelism=10 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-comparison-result=441 [max(10 (self) vs 441 (sum children))]
 37:AGGREGATE [STREAMING]
 |  Class 0
 |    output: sum(sales), sum(returns), sum(profit)
@@ -1335,13 +1335,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 63(GETNEXT), 25(OPEN)
 |  |
 |  62:EXCHANGE [HASH(web_site_id)]
-|  |  mem-estimate=129.15KB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=26.03KB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=22 row-size=76B cardinality=33 cost=15
 |  |  in pipelines: 25(GETNEXT)
 |  |
-|  F18:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=50 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=58.20MB mem-reservation=2.00MB thread-reservation=1
-|  max-parallelism=50 segment-costs=[441159182, 178] cpu-comparison-result=147 [max(70 (self) vs 147 (sum children))]
+|  F18:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=10 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=23.83MB mem-reservation=2.00MB thread-reservation=1
+|  max-parallelism=50 segment-costs=[441159182, 178] cpu-comparison-result=107 [max(30 (self) vs 107 (sum children))]
 |  36:AGGREGATE [STREAMING]
 |  |  output: sum(ws_ext_sales_price), sum(coalesce(wr_return_amt, CAST(0 AS DECIMAL(7,2)))), sum(ws_net_profit - coalesce(wr_net_loss, CAST(0 AS DECIMAL(7,2))))
 |  |  group by: web_site_id
@@ -1358,13 +1358,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 25(GETNEXT), 30(OPEN)
 |  |
 |  |--F37:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=10.74MB mem-reservation=10.69MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.99MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[4139]
 |  |  JOIN BUILD
 |  |  |  join-table-id=10 plan-id=11 cohort-id=03
 |  |  |  build expressions: p_promo_sk
 |  |  |  runtime filters: RF016[bloom] <- p_promo_sk, RF017[min_max] <- p_promo_sk
-|  |  |  mem-estimate=9.69MB mem-reservation=9.69MB spill-buffer=64.00KB thread-reservation=0 cost=1779
+|  |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=1779
 |  |  |
 |  |  61:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=50.53KB mem-reservation=0B thread-reservation=0
@@ -1396,13 +1396,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 25(GETNEXT), 28(OPEN)
 |  |
 |  |--F38:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=10.70MB mem-reservation=10.69MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[146]
 |  |  JOIN BUILD
 |  |  |  join-table-id=11 plan-id=12 cohort-id=03
 |  |  |  build expressions: web_site_sk
 |  |  |  runtime filters: RF018[bloom] <- web_site_sk, RF019[min_max] <- web_site_sk
-|  |  |  mem-estimate=9.69MB mem-reservation=9.69MB spill-buffer=64.00KB thread-reservation=0 cost=66
+|  |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=66
 |  |  |
 |  |  60:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -1431,13 +1431,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 25(GETNEXT), 29(OPEN)
 |  |
 |  |--F39:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=15.70MB mem-reservation=15.38MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=4.20MB mem-reservation=3.88MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[83840]
 |  |  JOIN BUILD
 |  |  |  join-table-id=12 plan-id=13 cohort-id=03
 |  |  |  build expressions: i_item_sk
 |  |  |  runtime filters: RF020[bloom] <- i_item_sk, RF021[min_max] <- i_item_sk
-|  |  |  mem-estimate=14.38MB mem-reservation=14.38MB spill-buffer=128.00KB thread-reservation=0 cost=36000
+|  |  |  mem-estimate=2.88MB mem-reservation=2.88MB spill-buffer=128.00KB thread-reservation=0 cost=36000
 |  |  |
 |  |  59:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=329.25KB mem-reservation=0B thread-reservation=0
@@ -1469,13 +1469,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 25(GETNEXT), 27(OPEN)
 |  |
 |  |--F40:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=10.70MB mem-reservation=10.69MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[71]
 |  |  JOIN BUILD
 |  |  |  join-table-id=13 plan-id=14 cohort-id=03
 |  |  |  build expressions: d_date_sk
 |  |  |  runtime filters: RF022[bloom] <- d_date_sk
-|  |  |  mem-estimate=9.69MB mem-reservation=9.69MB spill-buffer=64.00KB thread-reservation=0 cost=31
+|  |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=31
 |  |  |
 |  |  58:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -1506,13 +1506,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  tuple-ids=16,17N row-size=52B cardinality=36.71M(filtered from 2.16G) cost=400802306
 |  |  in pipelines: 25(GETNEXT), 26(OPEN)
 |  |
-|  |--F41:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=50 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=216.45MB mem-reservation=34.00MB thread-reservation=1
+|  |--F41:PLAN FRAGMENT [HASH(ws_item_sk,ws_order_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=1.01GB mem-reservation=34.00MB thread-reservation=1
 |  |  |  max-parallelism=50 segment-costs=[259872831]
 |  |  JOIN BUILD
 |  |  |  join-table-id=14 plan-id=15 cohort-id=03
 |  |  |  build expressions: wr_item_sk, wr_order_number
-|  |  |  mem-estimate=205.28MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=216002686
+|  |  |  mem-estimate=1.00GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=216002686
 |  |  |
 |  |  57:EXCHANGE [HASH(wr_item_sk,wr_order_number)]
 |  |  |  mem-estimate=11.17MB mem-reservation=0B thread-reservation=0
@@ -1521,7 +1521,7 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  |
 |  |  F17:PLAN FRAGMENT [RANDOM] hosts=10 instances=50 (adjusted from 120)
 |  |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  |  Per-Instance Resources: mem-estimate=20.69MB mem-reservation=256.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=16.94MB mem-reservation=256.00KB thread-reservation=1
 |  |  max-parallelism=50 segment-costs=[451704816]
 |  |  26:SCAN HDFS [tpcds_partitioned_parquet_snap.web_returns, RANDOM]
 |  |     HDFS partitions=2114/2114 files=2114 size=20.70MB
@@ -1542,7 +1542,7 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |
 |  F16:PLAN FRAGMENT [RANDOM] hosts=10 instances=20 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=4.00MB mem-reservation=4.00MB thread-reservation=0 runtime-filters-memory=4.00MB
-|  Per-Instance Resources: mem-estimate=23.03MB mem-reservation=128.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=17.41MB mem-reservation=128.00KB thread-reservation=1
 |  max-parallelism=20 segment-costs=[111480872]
 |  25:SCAN HDFS [tpcds_partitioned_parquet_snap.web_sales, RANDOM]
 |     HDFS partitions=1824/1824 files=1824 size=84.18MB
@@ -1564,13 +1564,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 55(GETNEXT), 13(OPEN)
 |  |
 |  54:EXCHANGE [HASH(cp_catalog_page_id)]
-|  |  mem-estimate=7.29MB mem-reservation=0B thread-reservation=0
+|  |  mem-estimate=1.04MB mem-reservation=0B thread-reservation=0
 |  |  tuple-ids=14 row-size=76B cardinality=36.00K cost=16585
 |  |  in pipelines: 13(GETNEXT)
 |  |
-|  F10:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=90 (adjusted from 120)
-|  Per-Instance Resources: mem-estimate=58.55MB mem-reservation=5.00MB thread-reservation=1
-|  max-parallelism=90 segment-costs=[891170974, 194745] cpu-comparison-result=237 [max(120 (self) vs 237 (sum children))]
+|  F10:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10 (adjusted from 120)
+|  Per-Instance Resources: mem-estimate=24.18MB mem-reservation=5.00MB thread-reservation=1
+|  max-parallelism=90 segment-costs=[891170974, 194745] cpu-comparison-result=157 [max(40 (self) vs 157 (sum children))]
 |  24:AGGREGATE [STREAMING]
 |  |  output: sum(cs_ext_sales_price), sum(coalesce(cr_return_amount, CAST(0 AS DECIMAL(7,2)))), sum(cs_net_profit - coalesce(cr_net_loss, CAST(0 AS DECIMAL(7,2))))
 |  |  group by: cp_catalog_page_id
@@ -1587,13 +1587,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 13(GETNEXT), 16(OPEN)
 |  |
 |  |--F32:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=27.01MB mem-reservation=25.88MB thread-reservation=1
+|  |  |  Per-Instance Resources: mem-estimate=4.01MB mem-reservation=2.88MB thread-reservation=1
 |  |  |  max-parallelism=10 segment-costs=[83840]
 |  |  JOIN BUILD
 |  |  |  join-table-id=05 plan-id=06 cohort-id=02
 |  |  |  build expressions: cp_catalog_page_sk
 |  |  |  runtime filters: RF009[min_max] <- cp_catalog_page_sk
-|  |  |  mem-estimate=25.88MB mem-reservation=25.88MB spill-buffer=128.00KB thread-reservation=0 cost=36000
+|  |  |  mem-estimate=2.88MB mem-reservation=2.88MB spill-buffer=128.00KB thread-reservation=0 cost=36000
 |  |  |
 |  |  53:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=1.13MB mem-reservation=0B thread-reservation=0
@@ -1622,13 +1622,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 13(GETNEXT), 18(OPEN)
 |  |
 |  |--F33:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=18.49MB mem-reservation=18.44MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.99MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[4139]
 |  |  JOIN BUILD
 |  |  |  join-table-id=06 plan-id=07 cohort-id=02
 |  |  |  build expressions: p_promo_sk
 |  |  |  runtime filters: RF010[bloom] <- p_promo_sk, RF011[min_max] <- p_promo_sk
-|  |  |  mem-estimate=17.44MB mem-reservation=17.44MB spill-buffer=64.00KB thread-reservation=0 cost=1779
+|  |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=1779
 |  |  |
 |  |  52:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=50.53KB mem-reservation=0B thread-reservation=0
@@ -1660,13 +1660,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 13(GETNEXT), 17(OPEN)
 |  |
 |  |--F34:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=27.20MB mem-reservation=26.88MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=4.20MB mem-reservation=3.88MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[83840]
 |  |  JOIN BUILD
 |  |  |  join-table-id=07 plan-id=08 cohort-id=02
 |  |  |  build expressions: i_item_sk
 |  |  |  runtime filters: RF012[bloom] <- i_item_sk, RF013[min_max] <- i_item_sk
-|  |  |  mem-estimate=25.88MB mem-reservation=25.88MB spill-buffer=128.00KB thread-reservation=0 cost=36000
+|  |  |  mem-estimate=2.88MB mem-reservation=2.88MB spill-buffer=128.00KB thread-reservation=0 cost=36000
 |  |  |
 |  |  51:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=329.25KB mem-reservation=0B thread-reservation=0
@@ -1698,13 +1698,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  in pipelines: 13(GETNEXT), 15(OPEN)
 |  |
 |  |--F35:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10
-|  |  |  Per-Instance Resources: mem-estimate=18.45MB mem-reservation=18.44MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  |  max-parallelism=10 segment-costs=[71]
 |  |  JOIN BUILD
 |  |  |  join-table-id=08 plan-id=09 cohort-id=02
 |  |  |  build expressions: d_date_sk
 |  |  |  runtime filters: RF014[bloom] <- d_date_sk
-|  |  |  mem-estimate=17.44MB mem-reservation=17.44MB spill-buffer=64.00KB thread-reservation=0 cost=31
+|  |  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=31
 |  |  |
 |  |  50:EXCHANGE [BROADCAST]
 |  |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -1735,13 +1735,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  tuple-ids=8,9N row-size=52B cardinality=73.14M(filtered from 4.32G) cost=801558970
 |  |  in pipelines: 13(GETNEXT), 14(OPEN)
 |  |
-|  |--F36:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=90 (adjusted from 120)
-|  |  |  Per-Instance Resources: mem-estimate=240.43MB mem-reservation=34.00MB thread-reservation=1
+|  |--F36:PLAN FRAGMENT [HASH(cs_item_sk,cs_order_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  |  Per-Instance Resources: mem-estimate=2.02GB mem-reservation=34.00MB thread-reservation=1
 |  |  |  max-parallelism=90 segment-costs=[519759641]
 |  |  JOIN BUILD
 |  |  |  join-table-id=09 plan-id=10 cohort-id=02
 |  |  |  build expressions: cr_item_sk, cr_order_number
-|  |  |  mem-estimate=228.09MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=432016991
+|  |  |  mem-estimate=2.00GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=432016991
 |  |  |
 |  |  49:EXCHANGE [HASH(cr_item_sk,cr_order_number)]
 |  |  |  mem-estimate=12.34MB mem-reservation=0B thread-reservation=0
@@ -1750,7 +1750,7 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |  |
 |  |  F09:PLAN FRAGMENT [RANDOM] hosts=10 instances=100 (adjusted from 120)
 |  |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  |  Per-Instance Resources: mem-estimate=24.44MB mem-reservation=32.00KB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=16.94MB mem-reservation=32.00KB thread-reservation=1
 |  |  max-parallelism=100 segment-costs=[903433931]
 |  |  14:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_returns, RANDOM]
 |  |     HDFS partitions=2060/2060 files=2060 size=30.47MB
@@ -1771,7 +1771,7 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  |
 |  F08:PLAN FRAGMENT [RANDOM] hosts=10 instances=30 (adjusted from 120)
 |  Per-Host Shared Resources: mem-estimate=3.00MB mem-reservation=3.00MB thread-reservation=0 runtime-filters-memory=3.00MB
-|  Per-Instance Resources: mem-estimate=28.66MB mem-reservation=1.00MB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=17.41MB mem-reservation=1.00MB thread-reservation=1
 |  max-parallelism=30 segment-costs=[222116656]
 |  13:SCAN HDFS [tpcds_partitioned_parquet_snap.catalog_sales, RANDOM]
 |     HDFS partitions=1831/1831 files=1831 size=150.82MB
@@ -1793,13 +1793,13 @@ max-parallelism=120 segment-costs=[2169, 125388, 29, 344492, 567467] cpu-compari
 |  in pipelines: 47(GETNEXT), 01(OPEN)
 |
 46:EXCHANGE [HASH(s_store_id)]
-|  mem-estimate=6.21MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=534.72KB mem-reservation=0B thread-reservation=0
 |  tuple-ids=6 row-size=76B cardinality=678 cost=312
 |  in pipelines: 01(GETNEXT)
 |
-F02:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=58.62MB mem-reservation=2.00MB thread-reservation=1
-max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [max(152 (self) vs 287 (sum children))]
+F02:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+Per-Instance Resources: mem-estimate=24.25MB mem-reservation=2.00MB thread-reservation=1
+max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=177 [max(42 (self) vs 177 (sum children))]
 12:AGGREGATE [STREAMING]
 |  output: sum(ss_ext_sales_price), sum(coalesce(sr_return_amt, CAST(0 AS DECIMAL(7,2)))), sum(ss_net_profit - coalesce(sr_net_loss, CAST(0 AS DECIMAL(7,2))))
 |  group by: s_store_id
@@ -1816,13 +1816,13 @@ max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [
 |  in pipelines: 01(GETNEXT), 04(OPEN)
 |
 |--F27:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=23.33MB mem-reservation=23.25MB thread-reservation=1
+|  |  Per-Instance Resources: mem-estimate=2.01MB mem-reservation=1.94MB thread-reservation=1
 |  |  max-parallelism=10 segment-costs=[3140]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: s_store_sk
 |  |  runtime filters: RF001[min_max] <- s_store_sk
-|  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=1350
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=1350
 |  |
 |  45:EXCHANGE [BROADCAST]
 |  |  mem-estimate=78.19KB mem-reservation=0B thread-reservation=0
@@ -1851,13 +1851,13 @@ max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [
 |  in pipelines: 01(GETNEXT), 06(OPEN)
 |
 |--F28:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=24.30MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=2.99MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[4139]
 |  JOIN BUILD
 |  |  join-table-id=01 plan-id=02 cohort-id=01
 |  |  build expressions: p_promo_sk
 |  |  runtime filters: RF002[bloom] <- p_promo_sk, RF003[min_max] <- p_promo_sk
-|  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=1779
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=1779
 |  |
 |  44:EXCHANGE [BROADCAST]
 |  |  mem-estimate=50.53KB mem-reservation=0B thread-reservation=0
@@ -1889,13 +1889,13 @@ max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [
 |  in pipelines: 01(GETNEXT), 05(OPEN)
 |
 |--F29:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=35.82MB mem-reservation=35.50MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=4.20MB mem-reservation=3.88MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[83840]
 |  JOIN BUILD
 |  |  join-table-id=02 plan-id=03 cohort-id=01
 |  |  build expressions: i_item_sk
 |  |  runtime filters: RF004[bloom] <- i_item_sk, RF005[min_max] <- i_item_sk
-|  |  mem-estimate=34.50MB mem-reservation=34.50MB spill-buffer=128.00KB thread-reservation=0 cost=36000
+|  |  mem-estimate=2.88MB mem-reservation=2.88MB spill-buffer=128.00KB thread-reservation=0 cost=36000
 |  |
 |  43:EXCHANGE [BROADCAST]
 |  |  mem-estimate=329.25KB mem-reservation=0B thread-reservation=0
@@ -1927,13 +1927,13 @@ max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [
 |  in pipelines: 01(GETNEXT), 03(OPEN)
 |
 |--F30:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=24.27MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=2.95MB mem-reservation=2.94MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[71]
 |  JOIN BUILD
 |  |  join-table-id=03 plan-id=04 cohort-id=01
 |  |  build expressions: d_date_sk
 |  |  runtime filters: RF006[bloom] <- d_date_sk
-|  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=31
+|  |  mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB thread-reservation=0 cost=31
 |  |
 |  42:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -1964,13 +1964,13 @@ max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [
 |  tuple-ids=0,1N row-size=52B cardinality=146.84M(filtered from 8.64G) cost=1603220974
 |  in pipelines: 01(GETNEXT), 02(OPEN)
 |
-|--F31:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  |  Per-Instance Resources: mem-estimate=354.94MB mem-reservation=34.00MB thread-reservation=1
+|--F31:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=4.02GB mem-reservation=34.00MB thread-reservation=1
 |  |  max-parallelism=180 segment-costs=[1039464723]
 |  JOIN BUILD
 |  |  join-table-id=04 plan-id=05 cohort-id=01
 |  |  build expressions: sr_item_sk, sr_ticket_number
-|  |  mem-estimate=342.13MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
+|  |  mem-estimate=4.01GB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
 |  |
 |  41:EXCHANGE [HASH(sr_item_sk,sr_ticket_number)]
 |  |  mem-estimate=12.81MB mem-reservation=0B thread-reservation=0
@@ -1979,7 +1979,7 @@ max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  Per-Instance Resources: mem-estimate=27.25MB mem-reservation=512.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=16.94MB mem-reservation=512.00KB thread-reservation=1
 |  max-parallelism=190 segment-costs=[1806773027]
 |  02:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -2000,7 +2000,7 @@ max-parallelism=180 segment-costs=[1764974287, 3667] cpu-comparison-result=287 [
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=32 (adjusted from 120)
 Per-Host Shared Resources: mem-estimate=3.00MB mem-reservation=3.00MB thread-reservation=0 runtime-filters-memory=3.00MB
-Per-Instance Resources: mem-estimate=32.88MB mem-reservation=8.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=17.41MB mem-reservation=8.00MB thread-reservation=1
 max-parallelism=32 segment-costs=[445926760]
 01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_sales, RANDOM]
    HDFS partitions=1824/1824 files=1824 size=199.33MB
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q93.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q93.test
index edc5d9889..55535b436 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q93.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q93.test
@@ -91,11 +91,11 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=24B cardinality=8.64G cost=2985961602
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=1.09GB Threads=56
-Per-Host Resource Estimates: Memory=5.70GB
+Max Per-Host Resource Reservation: Memory=627.70MB Threads=42
+Per-Host Resource Estimates: Memory=5.19GB
 F05:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=4.11MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[229] cpu-comparison-result=251 [max(1 (self) vs 251 (sum children))]
+|  max-parallelism=1 segment-costs=[229] cpu-comparison-result=181 [max(1 (self) vs 181 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: ss_customer_sk, sum(act_sales)
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=200
@@ -108,8 +108,8 @@ PLAN-ROOT SINK
 |  in pipelines: 06(GETNEXT)
 |
 F04:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=50 (adjusted from 120)
-Per-Instance Resources: mem-estimate=46.81MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=50 segment-costs=[101047778, 459933248, 83] cpu-comparison-result=251 [max(50 (self) vs 251 (sum children))]
+Per-Instance Resources: mem-estimate=45.17MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=50 segment-costs=[101047778, 459933248, 83] cpu-comparison-result=181 [max(50 (self) vs 181 (sum children))]
 06:TOP-N [LIMIT=100]
 |  order by: sum(act_sales) ASC, ss_customer_sk ASC
 |  mem-estimate=1.95KB mem-reservation=0B thread-reservation=0
@@ -124,17 +124,17 @@ max-parallelism=50 segment-costs=[101047778, 459933248, 83] cpu-comparison-resul
 |  in pipelines: 11(GETNEXT), 00(OPEN)
 |
 10:EXCHANGE [HASH(ss_customer_sk)]
-|  mem-estimate=12.81MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=11.17MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=4 row-size=20B cardinality=32.68M cost=6637451
 |  in pipelines: 00(GETNEXT)
 |
-F02:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=51.97MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=830 segment-costs=[8297732388, 58929854] cpu-comparison-result=251 [max(240 (self) vs 251 (sum children))]
+F02:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=50 (adjusted from 120)
+Per-Instance Resources: mem-estimate=76.13MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=830 segment-costs=[8297732388, 58929854] cpu-comparison-result=181 [max(170 (self) vs 181 (sum children))]
 05:AGGREGATE [STREAMING]
 |  output: sum(CASE WHEN sr_return_quantity IS NOT NULL THEN CAST((CAST(ss_quantity AS BIGINT) - CAST(sr_return_quantity AS BIGINT)) AS DECIMAL(19,0)) * ss_sales_price ELSE CAST((CAST(ss_quantity AS DECIMAL(10,0)) * ss_sales_price) AS DECIMAL(27,2)) END)
 |  group by: ss_customer_sk
-|  mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=58.16MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=4 row-size=20B cardinality=32.68M cost=363120847
 |  in pipelines: 00(GETNEXT)
 |
@@ -147,13 +147,13 @@ max-parallelism=830 segment-costs=[8297732388, 58929854] cpu-comparison-result=2
 |  in pipelines: 00(GETNEXT), 02(OPEN)
 |
 |--F06:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=24.27MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=10.70MB mem-reservation=10.69MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[1]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: r_reason_sk
 |  |  runtime filters: RF000[bloom] <- r_reason_sk, RF001[min_max] <- r_reason_sk
-|  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=1
+|  |  mem-estimate=9.69MB mem-reservation=9.69MB spill-buffer=64.00KB thread-reservation=0 cost=1
 |  |
 |  09:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -184,13 +184,13 @@ max-parallelism=830 segment-costs=[8297732388, 58929854] cpu-comparison-result=2
 |  tuple-ids=0,1N row-size=44B cardinality=8.64G cost=3781699633
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
-|--F07:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  |  Per-Instance Resources: mem-estimate=354.94MB mem-reservation=34.00MB thread-reservation=1
+|--F07:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=50 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=833.92MB mem-reservation=34.00MB thread-reservation=1
 |  |  max-parallelism=830 segment-costs=[1039464723]
 |  JOIN BUILD
 |  |  join-table-id=01 plan-id=02 cohort-id=01
 |  |  build expressions: sr_item_sk, sr_ticket_number
-|  |  mem-estimate=342.13MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
+|  |  mem-estimate=821.11MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
 |  |
 |  08:EXCHANGE [HASH(sr_item_sk,sr_ticket_number)]
 |  |  mem-estimate=12.81MB mem-reservation=0B thread-reservation=0
@@ -199,7 +199,7 @@ max-parallelism=830 segment-costs=[8297732388, 58929854] cpu-comparison-result=2
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  Per-Instance Resources: mem-estimate=27.25MB mem-reservation=512.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=20.69MB mem-reservation=512.00KB thread-reservation=1
 |  max-parallelism=190 segment-costs=[1806773027]
 |  01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -219,7 +219,7 @@ max-parallelism=830 segment-costs=[8297732388, 58929854] cpu-comparison-result=2
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=29.12MB mem-reservation=8.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=21.47MB mem-reservation=8.00MB thread-reservation=1
 max-parallelism=1824 segment-costs=[20791140047]
 00:SCAN HDFS [tpcds_partitioned_parquet_snap.store_sales, RANDOM]
    HDFS partitions=1824/1824 files=1824 size=199.33MB
@@ -232,11 +232,11 @@ max-parallelism=1824 segment-costs=[20791140047]
    tuple-ids=0 row-size=24B cardinality=8.64G cost=2985961602
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=1.09GB Threads=56
-Per-Host Resource Estimates: Memory=5.70GB
+Max Per-Host Resource Reservation: Memory=627.70MB Threads=42
+Per-Host Resource Estimates: Memory=5.19GB
 F05:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=4.11MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[229] cpu-comparison-result=251 [max(1 (self) vs 251 (sum children))]
+|  max-parallelism=1 segment-costs=[229] cpu-comparison-result=181 [max(1 (self) vs 181 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: ss_customer_sk, sum(act_sales)
 |  mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=200
@@ -249,8 +249,8 @@ PLAN-ROOT SINK
 |  in pipelines: 06(GETNEXT)
 |
 F04:PLAN FRAGMENT [HASH(ss_customer_sk)] hosts=10 instances=50 (adjusted from 120)
-Per-Instance Resources: mem-estimate=46.81MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=50 segment-costs=[101047778, 459933248, 83] cpu-comparison-result=251 [max(50 (self) vs 251 (sum children))]
+Per-Instance Resources: mem-estimate=45.17MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=50 segment-costs=[101047778, 459933248, 83] cpu-comparison-result=181 [max(50 (self) vs 181 (sum children))]
 06:TOP-N [LIMIT=100]
 |  order by: sum(act_sales) ASC, ss_customer_sk ASC
 |  mem-estimate=1.95KB mem-reservation=0B thread-reservation=0
@@ -265,17 +265,17 @@ max-parallelism=50 segment-costs=[101047778, 459933248, 83] cpu-comparison-resul
 |  in pipelines: 11(GETNEXT), 00(OPEN)
 |
 10:EXCHANGE [HASH(ss_customer_sk)]
-|  mem-estimate=12.81MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=11.17MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=4 row-size=20B cardinality=32.68M cost=6637451
 |  in pipelines: 00(GETNEXT)
 |
-F02:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=51.97MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=830 segment-costs=[8297732388, 58929854] cpu-comparison-result=251 [max(240 (self) vs 251 (sum children))]
+F02:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=50 (adjusted from 120)
+Per-Instance Resources: mem-estimate=76.13MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=830 segment-costs=[8297732388, 58929854] cpu-comparison-result=181 [max(170 (self) vs 181 (sum children))]
 05:AGGREGATE [STREAMING]
 |  output: sum(CASE WHEN sr_return_quantity IS NOT NULL THEN CAST((CAST(ss_quantity AS BIGINT) - CAST(sr_return_quantity AS BIGINT)) AS DECIMAL(19,0)) * ss_sales_price ELSE CAST((CAST(ss_quantity AS DECIMAL(10,0)) * ss_sales_price) AS DECIMAL(27,2)) END)
 |  group by: ss_customer_sk
-|  mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=58.16MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=4 row-size=20B cardinality=32.68M cost=363120847
 |  in pipelines: 00(GETNEXT)
 |
@@ -288,13 +288,13 @@ max-parallelism=830 segment-costs=[8297732388, 58929854] cpu-comparison-result=2
 |  in pipelines: 00(GETNEXT), 02(OPEN)
 |
 |--F06:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=10
-|  |  Per-Instance Resources: mem-estimate=24.27MB mem-reservation=24.25MB thread-reservation=1 runtime-filters-memory=1.00MB
+|  |  Per-Instance Resources: mem-estimate=10.70MB mem-reservation=10.69MB thread-reservation=1 runtime-filters-memory=1.00MB
 |  |  max-parallelism=10 segment-costs=[1]
 |  JOIN BUILD
 |  |  join-table-id=00 plan-id=01 cohort-id=01
 |  |  build expressions: r_reason_sk
 |  |  runtime filters: RF000[bloom] <- r_reason_sk, RF001[min_max] <- r_reason_sk
-|  |  mem-estimate=23.25MB mem-reservation=23.25MB spill-buffer=64.00KB thread-reservation=0 cost=1
+|  |  mem-estimate=9.69MB mem-reservation=9.69MB spill-buffer=64.00KB thread-reservation=0 cost=1
 |  |
 |  09:EXCHANGE [BROADCAST]
 |  |  mem-estimate=16.00KB mem-reservation=0B thread-reservation=0
@@ -325,13 +325,13 @@ max-parallelism=830 segment-costs=[8297732388, 58929854] cpu-comparison-result=2
 |  tuple-ids=0,1N row-size=44B cardinality=8.64G cost=3781699633
 |  in pipelines: 00(GETNEXT), 01(OPEN)
 |
-|--F07:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=120
-|  |  Per-Instance Resources: mem-estimate=354.94MB mem-reservation=34.00MB thread-reservation=1
+|--F07:PLAN FRAGMENT [HASH(ss_item_sk,ss_ticket_number)] hosts=10 instances=50 (adjusted from 120)
+|  |  Per-Instance Resources: mem-estimate=833.92MB mem-reservation=34.00MB thread-reservation=1
 |  |  max-parallelism=830 segment-costs=[1039464723]
 |  JOIN BUILD
 |  |  join-table-id=01 plan-id=02 cohort-id=01
 |  |  build expressions: sr_item_sk, sr_ticket_number
-|  |  mem-estimate=342.13MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
+|  |  mem-estimate=821.11MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0 cost=863988632
 |  |
 |  08:EXCHANGE [HASH(sr_item_sk,sr_ticket_number)]
 |  |  mem-estimate=12.81MB mem-reservation=0B thread-reservation=0
@@ -340,7 +340,7 @@ max-parallelism=830 segment-costs=[8297732388, 58929854] cpu-comparison-result=2
 |  |
 |  F01:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
 |  Per-Host Shared Resources: mem-estimate=1.00MB mem-reservation=1.00MB thread-reservation=0 runtime-filters-memory=1.00MB
-|  Per-Instance Resources: mem-estimate=27.25MB mem-reservation=512.00KB thread-reservation=1
+|  Per-Instance Resources: mem-estimate=20.69MB mem-reservation=512.00KB thread-reservation=1
 |  max-parallelism=190 segment-costs=[1806773027]
 |  01:SCAN HDFS [tpcds_partitioned_parquet_snap.store_returns, RANDOM]
 |     HDFS partitions=2004/2004 files=2004 size=33.63MB
@@ -360,7 +360,7 @@ max-parallelism=830 segment-costs=[8297732388, 58929854] cpu-comparison-result=2
 |  in pipelines: 00(GETNEXT)
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=120
-Per-Instance Resources: mem-estimate=29.12MB mem-reservation=8.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=21.47MB mem-reservation=8.00MB thread-reservation=1
 max-parallelism=1824 segment-costs=[20791140047]
 00:SCAN HDFS [tpcds_partitioned_parquet_snap.store_sales, RANDOM]
    HDFS partitions=1824/1824 files=1824 size=199.33MB
diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q98.test b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q98.test
index 47a7f825d..2c002a537 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q98.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q98.test
@@ -122,11 +122,11 @@ PLAN-ROOT SINK
    tuple-ids=0 row-size=12B cardinality=146.84M(filtered from 8.64G) cost=25374125
    in pipelines: 00(GETNEXT)
 ---- DISTRIBUTEDPLAN
-Max Per-Host Resource Reservation: Memory=665.25MB Threads=20
-Per-Host Resource Estimates: Memory=4.64GB
+Max Per-Host Resource Reservation: Memory=597.25MB Threads=18
+Per-Host Resource Estimates: Memory=4.51GB
 F05:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=610.66MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[338218022] cpu-comparison-result=60 [max(1 (self) vs 60 (sum children))]
+|  max-parallelism=1 segment-costs=[338218022] cpu-comparison-result=50 [max(1 (self) vs 50 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: i_item_id, i_item_desc, i_category, i_class, i_current_price, sum(ss_ext_sales_price), sum(ss_ext_sales_price) * CAST(100 AS DECIMAL(3,0)) / sum(sum(ss_ext_sales_price))
 |  mem-estimate=100.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=308212032
@@ -139,7 +139,7 @@ PLAN-ROOT SINK
 |
 F04:PLAN FRAGMENT [HASH(i_class)] hosts=10 instances=50 (adjusted from 120)
 Per-Instance Resources: mem-estimate=350.49MB mem-reservation=28.00MB thread-reservation=1
-max-parallelism=50 segment-costs=[442771870, 472393411, 261045294] cpu-comparison-result=60 [max(50 (self) vs 60 (sum children))]
+max-parallelism=50 segment-costs=[442771870, 472393411, 261045294] cpu-comparison-result=50 [max(50 (self) vs 40 (sum children))]
 08:SORT
 |  order by: i_category ASC, i_class ASC, i_item_id ASC, i_item_desc ASC, sum(ss_ext_sales_price) * 100 / sum(sum(ss_ext_sales_price)) ASC
 |  mem-estimate=179.97MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
@@ -160,17 +160,17 @@ max-parallelism=50 segment-costs=[442771870, 472393411, 261045294] cpu-compariso
 |  in pipelines: 06(GETNEXT), 12(OPEN)
 |
 13:EXCHANGE [HASH(i_class)]
-|  mem-estimate=21.85MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=17.90MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=3 row-size=198B cardinality=44.03M cost=45053816
 |  in pipelines: 12(GETNEXT)
 |
-F03:PLAN FRAGMENT [HASH(i_item_id,i_item_desc,i_category,i_class,i_current_price)] hosts=10 instances=60 (adjusted from 120)
-Per-Instance Resources: mem-estimate=186.68MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=60 segment-costs=[304946988, 584953131] cpu-comparison-result=60 [max(60 (self) vs 32 (sum children))]
+F03:PLAN FRAGMENT [HASH(i_item_id,i_item_desc,i_category,i_class,i_current_price)] hosts=10 instances=40 (adjusted from 120)
+Per-Instance Resources: mem-estimate=260.27MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=60 segment-costs=[304946988, 584953131] cpu-comparison-result=40 [max(40 (self) vs 32 (sum children))]
 12:AGGREGATE [FINALIZE]
 |  output: sum:merge(ss_ext_sales_price)
 |  group by: i_item_id, i_item_desc, i_category, i_class, i_current_price
-|  mem-estimate=147.17MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=220.76MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=3 row-size=198B cardinality=44.03M cost=259893172
 |  in pipelines: 12(GETNEXT), 00(OPEN)
 |
@@ -181,7 +181,7 @@ max-parallelism=60 segment-costs=[304946988, 584953131] cpu-comparison-result=60
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=32 (adjusted from 120)
 Per-Host Shared Resources: mem-estimate=2.00MB mem-reservation=2.00MB thread-reservation=0 runtime-filters-memory=2.00MB
-Per-Instance Resources: mem-estimate=270.37MB mem-reservation=42.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=254.57MB mem-reservation=42.00MB thread-reservation=1
 max-parallelism=32 segment-costs=[395182609, 584953131] cpu-comparison-result=32 [max(32 (self) vs 25 (sum children))]
 05:AGGREGATE [STREAMING]
 |  output: sum(ss_ext_sales_price)
@@ -278,11 +278,11 @@ max-parallelism=32 segment-costs=[395182609, 584953131] cpu-comparison-result=32
    tuple-ids=0 row-size=12B cardinality=146.84M(filtered from 8.64G) cost=25374125
    in pipelines: 00(GETNEXT)
 ---- PARALLELPLANS
-Max Per-Host Resource Reservation: Memory=665.25MB Threads=20
-Per-Host Resource Estimates: Memory=4.64GB
+Max Per-Host Resource Reservation: Memory=597.25MB Threads=18
+Per-Host Resource Estimates: Memory=4.51GB
 F05:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
 |  Per-Instance Resources: mem-estimate=610.66MB mem-reservation=4.00MB thread-reservation=1
-|  max-parallelism=1 segment-costs=[338218022] cpu-comparison-result=60 [max(1 (self) vs 60 (sum children))]
+|  max-parallelism=1 segment-costs=[338218022] cpu-comparison-result=50 [max(1 (self) vs 50 (sum children))]
 PLAN-ROOT SINK
 |  output exprs: i_item_id, i_item_desc, i_category, i_class, i_current_price, sum(ss_ext_sales_price), sum(ss_ext_sales_price) * CAST(100 AS DECIMAL(3,0)) / sum(sum(ss_ext_sales_price))
 |  mem-estimate=100.00MB mem-reservation=4.00MB spill-buffer=2.00MB thread-reservation=0 cost=308212032
@@ -295,7 +295,7 @@ PLAN-ROOT SINK
 |
 F04:PLAN FRAGMENT [HASH(i_class)] hosts=10 instances=50 (adjusted from 120)
 Per-Instance Resources: mem-estimate=350.49MB mem-reservation=28.00MB thread-reservation=1
-max-parallelism=50 segment-costs=[442771870, 472393411, 261045294] cpu-comparison-result=60 [max(50 (self) vs 60 (sum children))]
+max-parallelism=50 segment-costs=[442771870, 472393411, 261045294] cpu-comparison-result=50 [max(50 (self) vs 40 (sum children))]
 08:SORT
 |  order by: i_category ASC, i_class ASC, i_item_id ASC, i_item_desc ASC, sum(ss_ext_sales_price) * 100 / sum(sum(ss_ext_sales_price)) ASC
 |  mem-estimate=179.97MB mem-reservation=12.00MB spill-buffer=2.00MB thread-reservation=0
@@ -316,17 +316,17 @@ max-parallelism=50 segment-costs=[442771870, 472393411, 261045294] cpu-compariso
 |  in pipelines: 06(GETNEXT), 12(OPEN)
 |
 13:EXCHANGE [HASH(i_class)]
-|  mem-estimate=21.85MB mem-reservation=0B thread-reservation=0
+|  mem-estimate=17.90MB mem-reservation=0B thread-reservation=0
 |  tuple-ids=3 row-size=198B cardinality=44.03M cost=45053816
 |  in pipelines: 12(GETNEXT)
 |
-F03:PLAN FRAGMENT [HASH(i_item_id,i_item_desc,i_category,i_class,i_current_price)] hosts=10 instances=60 (adjusted from 120)
-Per-Instance Resources: mem-estimate=186.68MB mem-reservation=34.00MB thread-reservation=1
-max-parallelism=60 segment-costs=[304946988, 584953131] cpu-comparison-result=60 [max(60 (self) vs 32 (sum children))]
+F03:PLAN FRAGMENT [HASH(i_item_id,i_item_desc,i_category,i_class,i_current_price)] hosts=10 instances=40 (adjusted from 120)
+Per-Instance Resources: mem-estimate=260.27MB mem-reservation=34.00MB thread-reservation=1
+max-parallelism=60 segment-costs=[304946988, 584953131] cpu-comparison-result=40 [max(40 (self) vs 32 (sum children))]
 12:AGGREGATE [FINALIZE]
 |  output: sum:merge(ss_ext_sales_price)
 |  group by: i_item_id, i_item_desc, i_category, i_class, i_current_price
-|  mem-estimate=147.17MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
+|  mem-estimate=220.76MB mem-reservation=34.00MB spill-buffer=2.00MB thread-reservation=0
 |  tuple-ids=3 row-size=198B cardinality=44.03M cost=259893172
 |  in pipelines: 12(GETNEXT), 00(OPEN)
 |
@@ -337,7 +337,7 @@ max-parallelism=60 segment-costs=[304946988, 584953131] cpu-comparison-result=60
 |
 F00:PLAN FRAGMENT [RANDOM] hosts=10 instances=32 (adjusted from 120)
 Per-Host Shared Resources: mem-estimate=2.00MB mem-reservation=2.00MB thread-reservation=0 runtime-filters-memory=2.00MB
-Per-Instance Resources: mem-estimate=270.37MB mem-reservation=42.00MB thread-reservation=1
+Per-Instance Resources: mem-estimate=254.57MB mem-reservation=42.00MB thread-reservation=1
 max-parallelism=32 segment-costs=[395182609, 584953131] cpu-comparison-result=32 [max(32 (self) vs 25 (sum children))]
 05:AGGREGATE [STREAMING]
 |  output: sum(ss_ext_sales_price)