Package io.prestosql.cost
Class PlanCostEstimate
- java.lang.Object
-
- io.prestosql.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 boolean
equals(Object o)
double
getCpuCost()
Returns CPU component of the cost.double
getMaxMemory()
Returns maximal memory usage of a query plan (or subplan).double
getMaxMemoryWhenOutputting()
Returns maximal memory usage of a query plan (or subplan) after a first output row was produced.double
getNetworkCost()
Returns network component of the cost.LocalCostEstimate
getRootNodeLocalCostEstimate()
Returns local cost estimate for the root plan node.int
hashCode()
boolean
hasUnknownComponents()
Returns true if this cost has unknown components.static PlanCostEstimate
infinite()
String
toString()
static PlanCostEstimate
unknown()
static PlanCostEstimate
zero()
-
-
-
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.
-
-