Top Description Methods
org.apache.derby.iapi.sql.compile

public Interface CostEstimate

extends StoreCostResult
Known Direct Implementers
org.apache.derby.impl.sql.compile.CostEstimateImpl
Imports
org.apache.derby.iapi.store.access.StoreCostResult

A CostEstimate represents the cost of getting a ResultSet, along with the ordering of rows in the ResultSet, and the estimated number of rows in this ResultSet.

Method Summary

Modifier and TypeMethod and Description
public CostEstimate

Returns:

this + other.
add
(CostEstimate
This cost estimate to add this one to.
addend
,
CostEstimate
If non-null, put the result here.
retval
)

Add this cost estimate to another one.

public CostEstimate
cloneMe()

Get a copy of this CostEstimate

public double

Returns:

< 0 if this < other, 0 if this == other, > 0 if this > other
compare
(CostEstimate
The cost estimate to compare this one with
other
)

Compare this cost estimate with the given cost estimate.

public CostEstimate

Returns:

this / divisor
divide
(double
The value to divide this CostEstimate by.
divisor
,
CostEstimate
If non-null, put the result here.
retval
)

Divide this cost estimate by a scalar, non-dimensional number.

public boolean

Returns:

Whether or not this CostEstimate is uninitialized.
isUninitialized
()

Return whether or not this CostEstimate is uninitialized.

public CostEstimate

Returns:

this * multiplicand
multiply
(double
The value to multiply this CostEstimate by.
multiplicand
,
CostEstimate
If non-null, put the result here.
retval
)

Multiply this cost estimate by a scalar, non-dimensional number.

public double
rowCount()

Get the estimated number of rows returned by the ResultSet that this CostEstimate models.

public void
setCost(double cost, double rowCount, double singleScanRowCount)

Set the cost for this cost estimate.

public void
setCost(CostEstimate other)

Copy the values from the given cost estimate into this one.

public void
setSingleScanRowCount(double singleRowScanCount)

Set the single scan row count.

public double
singleScanRowCount()

Get the estimated number of rows returned by a single scan of the ResultSet that this CostEstimate models.

Inherited from org.apache.derby.iapi.store.access.StoreCostResult:
getEstimatedCostgetEstimatedRowCountsetEstimatedCostsetEstimatedRowCount

Method Detail

addback to summary
public CostEstimate add(CostEstimate addend, CostEstimate retval)

Add this cost estimate to another one. This presumes that any row ordering is destroyed.

Parameters
addend:CostEstimate

This cost estimate to add this one to.

retval:CostEstimate

If non-null, put the result here.

Returns:CostEstimate

this + other.

cloneMeback to summary
public CostEstimate cloneMe()

Get a copy of this CostEstimate

compareback to summary
public double compare(CostEstimate other)

Compare this cost estimate with the given cost estimate.

Parameters
other:CostEstimate

The cost estimate to compare this one with

Returns:double

< 0 if this < other, 0 if this == other, > 0 if this > other

divideback to summary
public CostEstimate divide(double divisor, CostEstimate retval)

Divide this cost estimate by a scalar, non-dimensional number.

Parameters
divisor:double

The value to divide this CostEstimate by.

retval:CostEstimate

If non-null, put the result here.

Returns:CostEstimate

this / divisor

isUninitializedback to summary
public boolean isUninitialized()

Return whether or not this CostEstimate is uninitialized.

Returns:boolean

Whether or not this CostEstimate is uninitialized.

multiplyback to summary
public CostEstimate multiply(double multiplicand, CostEstimate retval)

Multiply this cost estimate by a scalar, non-dimensional number. This presumes that any row ordering is destroyed.

Parameters
multiplicand:double

The value to multiply this CostEstimate by.

retval:CostEstimate

If non-null, put the result here.

Returns:CostEstimate

this * multiplicand

rowCountback to summary
public double rowCount()

Get the estimated number of rows returned by the ResultSet that this CostEstimate models.

setCostback to summary
public void setCost(double cost, double rowCount, double singleScanRowCount)

Set the cost for this cost estimate.

setCostback to summary
public void setCost(CostEstimate other)

Copy the values from the given cost estimate into this one.

setSingleScanRowCountback to summary
public void setSingleScanRowCount(double singleRowScanCount)

Set the single scan row count.

singleScanRowCountback to summary
public double singleScanRowCount()

Get the estimated number of rows returned by a single scan of the ResultSet that this CostEstimate models.