zhangwenchao-123 commented on code in PR #1452:
URL: https://github.com/apache/cloudberry/pull/1452#discussion_r2566973360
##########
src/backend/gporca/libgpdbcost/src/CCostModelGPDB.cpp:
##########
@@ -2402,13 +2404,18 @@ CCostModelGPDB::CostScan(CMemoryPool *, // mp
case COperator::EopPhysicalForeignScan:
case COperator::EopPhysicalDynamicForeignScan:
case COperator::EopPhysicalParallelTableScan:
+ case COperator::EopPhysicalAppendTableScan:
// table scan cost considers only retrieving tuple cost,
// since we scan the entire table here, the cost is
correlated with table rows and table width,
// since Scan's parent operator may be a filter that
will be pushed into Scan node in GPDB plan,
// we add Scan output tuple cost in the parent operator
and not here
return CCost(
pci->NumRebinds() *
(dInitScan + pci->Rows() * dTableWidth *
dTableScanCostUnit));
+ case COperator::EopPhysicalParallelAppendTableScan:
+ return CCost(
+ pci->NumRebinds() *
+ (dInitScan + pci->Rows() * dTableWidth
* dTableScanCostUnit) - 10);
Review Comment:
yeah, should calc with devide with parallel workers
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]