|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> sql >> [ compile overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.iapi.sql.compile
Interface RequiredRowOrdering

- public interface RequiredRowOrdering
This interface provides a representation of the required ordering of rows from a ResultSet. Different operations can require ordering: ORDER BY, DISTINCT, GROUP BY. Some operations, like ORDER BY, require that the columns be ordered a particular way, while others, like DISTINCT and GROUP BY, reuire only that there be no duplicates in the result.
| Field Summary | |
static int |
ELIMINATE_DUPS
|
static int |
NOTHING_REQUIRED
|
static int |
SORT_REQUIRED
|
| Method Summary | |
void |
estimateCost(double estimatedInputRows,
RowOrdering rowOrdering,
CostEstimate resultCost)
Estimate the cost of doing a sort for this row ordering, given the number of rows to be sorted. |
boolean |
getSortNeeded()
|
void |
sortNeeded()
Indicate that a sort is necessary to fulfill this required ordering. |
void |
sortNotNeeded()
Indicate that a sort is *NOT* necessary to fulfill this required ordering. |
int |
sortRequired(RowOrdering rowOrdering)
Tell whether sorting is required for this RequiredRowOrdering, given a RowOrdering. |
int |
sortRequired(RowOrdering rowOrdering,
org.apache.derby.iapi.util.JBitSet tableMap)
Tell whether sorting is required for this RequiredRowOrdering, given a RowOrdering representing a partial join order, and a bit map telling what tables are represented in the join order. |
| Field Detail |
SORT_REQUIRED
public static final int SORT_REQUIRED
- See Also:
- Constant Field Values
ELIMINATE_DUPS
public static final int ELIMINATE_DUPS
- See Also:
- Constant Field Values
NOTHING_REQUIRED
public static final int NOTHING_REQUIRED
- See Also:
- Constant Field Values
| Method Detail |
sortRequired
public int sortRequired(RowOrdering rowOrdering) throws org.apache.derby.iapi.error.StandardException
- Tell whether sorting is required for this RequiredRowOrdering,
given a RowOrdering.
sortRequired
public int sortRequired(RowOrdering rowOrdering, org.apache.derby.iapi.util.JBitSet tableMap) throws org.apache.derby.iapi.error.StandardException
- Tell whether sorting is required for this RequiredRowOrdering,
given a RowOrdering representing a partial join order, and
a bit map telling what tables are represented in the join order.
This is useful for reducing the number of cases the optimizer
has to consider.
estimateCost
public void estimateCost(double estimatedInputRows,
RowOrdering rowOrdering,
CostEstimate resultCost)
throws org.apache.derby.iapi.error.StandardException
- Estimate the cost of doing a sort for this row ordering, given
the number of rows to be sorted. This does not take into account
whether the sort is really needed. It also estimates the number of
result rows.
sortNeeded
public void sortNeeded()
- Indicate that a sort is necessary to fulfill this required ordering.
This method may be called many times during a single optimization.
sortNotNeeded
public void sortNotNeeded()
- Indicate that a sort is *NOT* necessary to fulfill this required
ordering. This method may be called many times during a single
optimization.
getSortNeeded
public boolean getSortNeeded()
|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> sql >> [ compile overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC