Package io.trino.cost
Class PlanCostEstimate
java.lang.Object
io.trino.cost.PlanCostEstimate
-
Constructor Summary
ConstructorsConstructorDescriptionPlanCostEstimate(double cpuCost, double maxMemory, double maxMemoryWhenOutputting, double networkCost) PlanCostEstimate(double cpuCost, double maxMemory, double maxMemoryWhenOutputting, double networkCost, LocalCostEstimate rootNodeLocalCostEstimate) -
Method Summary
Modifier and TypeMethodDescriptionbooleandoubleReturns CPU component of the cost.doubleReturns maximal memory usage of a query plan (or subplan).doubleReturns maximal memory usage of a query plan (or subplan) after a first output row was produced.doubleReturns network component of the cost.Returns local cost estimate for the root plan node.inthashCode()booleanReturns true if this cost has unknown components.static PlanCostEstimateinfinite()toString()static PlanCostEstimateunknown()static PlanCostEstimatezero()
-
Constructor Details
-
PlanCostEstimate
public PlanCostEstimate(double cpuCost, double maxMemory, double maxMemoryWhenOutputting, double networkCost) -
PlanCostEstimate
public PlanCostEstimate(double cpuCost, double maxMemory, double maxMemoryWhenOutputting, double networkCost, LocalCostEstimate rootNodeLocalCostEstimate)
-
-
Method Details
-
infinite
-
unknown
-
zero
-
getCpuCost
public double getCpuCost()Returns CPU component of the cost.Unknown value is represented by
Double.NaN -
getMaxMemory
public double getMaxMemory()Returns maximal memory usage of a query plan (or subplan).Unknown value is represented by
Double.NaN -
getMaxMemoryWhenOutputting
public double getMaxMemoryWhenOutputting()Returns maximal memory usage of a query plan (or subplan) after a first output row was produced. When this cost represents a cost of a subplan, this information can be used to determine maximum memory usage (and maximum memory usage after a first output row was produced) for plan nodes higher up in the plan tree.Unknown value is represented by
Double.NaN. -
getNetworkCost
public double getNetworkCost()Returns network component of the cost.Unknown value is represented by
Double.NaN -
getRootNodeLocalCostEstimate
Returns local cost estimate for the root plan node. -
hasUnknownComponents
public boolean hasUnknownComponents()Returns true if this cost has unknown components. -
toString
-
equals
-
hashCode
public int hashCode()
-