Package io.trino.cost
Class PlanCostEstimate
- java.lang.Object
-
- io.trino.cost.PlanCostEstimate
-
public final class PlanCostEstimate extends Object
-
-
Constructor Summary
Constructors Constructor Description PlanCostEstimate(double cpuCost, double maxMemory, double maxMemoryWhenOutputting, double networkCost)PlanCostEstimate(double cpuCost, double maxMemory, double maxMemoryWhenOutputting, double networkCost, LocalCostEstimate rootNodeLocalCostEstimate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)doublegetCpuCost()Returns CPU component of the cost.doublegetMaxMemory()Returns maximal memory usage of a query plan (or subplan).doublegetMaxMemoryWhenOutputting()Returns maximal memory usage of a query plan (or subplan) after a first output row was produced.doublegetNetworkCost()Returns network component of the cost.LocalCostEstimategetRootNodeLocalCostEstimate()Returns local cost estimate for the root plan node.inthashCode()booleanhasUnknownComponents()Returns true if this cost has unknown components.static PlanCostEstimateinfinite()StringtoString()static PlanCostEstimateunknown()static PlanCostEstimatezero()
-
-
-
Constructor Detail
-
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 Detail
-
infinite
public static PlanCostEstimate infinite()
-
unknown
public static PlanCostEstimate unknown()
-
zero
public static PlanCostEstimate 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
public LocalCostEstimate getRootNodeLocalCostEstimate()
Returns local cost estimate for the root plan node.
-
hasUnknownComponents
public boolean hasUnknownComponents()
Returns true if this cost has unknown components.
-
-