org.teiid.query.optimizer.relational.rules
Class NewCalculateCostUtil

java.lang.Object
  extended by org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil

public class NewCalculateCostUtil
extends java.lang.Object

Since:
4.3

Field Summary
static int UNKNOWN_JOIN_SCALING
           
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 dependent 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
static boolean usesKey(Criteria crit, QueryMetadataInterface metadata)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN_JOIN_SCALING

public static final int UNKNOWN_JOIN_SCALING
See Also:
Constant Field Values

UNKNOWN_VALUE

public static final float UNKNOWN_VALUE
See Also:
Constant Field Values
Constructor Detail

NewCalculateCostUtil

public NewCalculateCostUtil()
Method Detail

usesKey

public static boolean usesKey(Criteria crit,
                              QueryMetadataInterface metadata)
                       throws QueryMetadataException,
                              TeiidComponentException
Throws:
QueryMetadataException
TeiidComponentException

computeCostForJoin

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

Throws:
TeiidComponentException
QueryMetadataException

computeCostForDepJoin

public static float computeCostForDepJoin(PlanNode joinNode,
                                          boolean leftIndependent,
                                          JoinNode.JoinStrategyType joinStrategy,
                                          QueryMetadataInterface metadata,
                                          CapabilitiesFinder capFinder,
                                          CommandContext context)
                                   throws TeiidComponentException,
                                          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 dependent 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:
TeiidComponentException
QueryMetadataException


Copyright © 2010. All Rights Reserved.