Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
ghx-label-6
Description
High cardinality overestimation can lead to severe memory overestimation for SORT node, even in Parallel Plan. TPC-DS Q31 and Q51 plan against synthetic 3TB scale workload shows such huge overestimation:
Planner should be aware to not estimate terabytes/petabytes of memory for SORT node, knowing that SORT node has ability to spill-to-disk under memory pressure. Planner can also take account for SORT_RUN_BYTES_LIMIT or MAX_SORT_RUN_SIZE option value to come up with lower memory estimate.