com.metamatrix.query.optimizer.relational.rules
Class NewCalculateCostUtil

java.lang.Object
  extended by com.metamatrix.query.optimizer.relational.rules.NewCalculateCostUtil

public class NewCalculateCostUtil
extends java.lang.Object

Since:
4.3

Field Summary
static int DEFAULT_STRONG_COST
           
static float UNKNOWN_VALUE
           
 
Constructor Summary
NewCalculateCostUtil()
           
 
Method Summary
static float computeCostForDepJoin(PlanNode joinNode, boolean leftIndependent, JoinNode.JoinStrategyType joinStrategy, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, CommandContext context)
          Computes the cost of a Dependent Join The worst possible cost will arise from a high independent ndv (many dependent sets) and a low depenendent ndv (possibly many matches per set) This logic uses the same assumption as criteria in that ndv is used as a divisor of cardinality.
static float computeCostForJoin(PlanNode leftChildNode, PlanNode rightChildNode, JoinNode.JoinStrategyType joinStrategy, QueryMetadataInterface metadata, CommandContext context)
          Computes the cost of a Merge Join
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN_VALUE

public static final float UNKNOWN_VALUE
See Also:
Constant Field Values

DEFAULT_STRONG_COST

public static final int DEFAULT_STRONG_COST
See Also:
Constant Field Values
Constructor Detail

NewCalculateCostUtil

public NewCalculateCostUtil()
Method Detail

computeCostForJoin

public static float computeCostForJoin(PlanNode leftChildNode,
                                       PlanNode rightChildNode,
                                       JoinNode.JoinStrategyType joinStrategy,
                                       QueryMetadataInterface metadata,
                                       CommandContext context)
                                throws MetaMatrixComponentException,
                                       QueryMetadataException
Computes the cost of a Merge Join

Throws:
MetaMatrixComponentException
QueryMetadataException

computeCostForDepJoin

public static float computeCostForDepJoin(PlanNode joinNode,
                                          boolean leftIndependent,
                                          JoinNode.JoinStrategyType joinStrategy,
                                          QueryMetadataInterface metadata,
                                          CapabilitiesFinder capFinder,
                                          CommandContext context)
                                   throws MetaMatrixComponentException,
                                          QueryMetadataException
Computes the cost of a Dependent Join The worst possible cost will arise from a high independent ndv (many dependent sets) and a low depenendent ndv (possibly many matches per set) This logic uses the same assumption as criteria in that ndv is used as a divisor of cardinality.

Throws:
MetaMatrixComponentException
QueryMetadataException


Copyright © 2009. All Rights Reserved.