You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2018/02/28 16:34:38 UTC
[1/2] trafodion git commit: [TRAFODION-2966] Fix new MDAM costing
code to respect CQS forces
Repository: trafodion
Updated Branches:
refs/heads/master 2be44ed1b -> aec5108ad
[TRAFODION-2966] Fix new MDAM costing code to respect CQS forces
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/5711693c
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/5711693c
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/5711693c
Branch: refs/heads/master
Commit: 5711693cc353dd3bf6c7a26bd538a3298202b2f3
Parents: 75c7b39
Author: Dave Birdsall <db...@apache.org>
Authored: Tue Feb 27 23:37:17 2018 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Tue Feb 27 23:37:17 2018 +0000
----------------------------------------------------------------------
core/sql/optimizer/ScanOptimizer.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafodion/blob/5711693c/core/sql/optimizer/ScanOptimizer.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/ScanOptimizer.cpp b/core/sql/optimizer/ScanOptimizer.cpp
index 9d859f5..c9b40aa 100644
--- a/core/sql/optimizer/ScanOptimizer.cpp
+++ b/core/sql/optimizer/ScanOptimizer.cpp
@@ -10350,10 +10350,11 @@ void NewMDAMCostWA::compute()
CostScalar costAdj = (ActiveSchemaDB()->getDefaults()).getAsDouble(NCM_MDAM_COST_ADJ_FACTOR);
scmCost_->cpScmlr().scaleByValue(costAdj);
- // If the cost exceeds the bound, MDAM loses
+ // If MDAM is not forced and the cost exceeds the bound, MDAM loses
- if (costBoundPtr_ != NULL &&
- costBoundPtr_->scmCompareCosts(*scmCost_) == LESS)
+ if (!mdamForced_ &&
+ (costBoundPtr_ != NULL) &&
+ (costBoundPtr_->scmCompareCosts(*scmCost_) == LESS))
{
mdamWon_ = FALSE;
MDAM_DEBUG0(MTL2, "Mdam scan lost due to higher cost determined by scmCompareCosts()");
[2/2] trafodion git commit: Merge [TRAFODION-2966] Fix new MDAM
costing code to respect CQS statements
Posted by db...@apache.org.
Merge [TRAFODION-2966] Fix new MDAM costing code to respect CQS statements
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/aec5108a
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/aec5108a
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/aec5108a
Branch: refs/heads/master
Commit: aec5108adf2f36ed34d1effe04c2b574f4dd5a30
Parents: 2be44ed 5711693
Author: Dave Birdsall <db...@apache.org>
Authored: Wed Feb 28 16:33:49 2018 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Wed Feb 28 16:33:49 2018 +0000
----------------------------------------------------------------------
core/sql/optimizer/ScanOptimizer.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------