org.apache.derby.vti
Interface VTICosting

All Known Implementing Classes:
ErrorMessages, LockTable, SpaceTable, TransactionTable

public interface VTICosting

VTICosting is the interface that the query optimizer uses to cost VTIs. The methods on the interface provide the optimizer with the following information:

This class can only be used within an SQL-J statement. Using the methods in application-side Java code results in Exceptions being thrown.

IBM Corp reserves the right to change, rename, or remove this interface at any time.

See Also:
VTIEnvironment

Field Summary
static double defaultEstimatedCost
          A useful constant: The default estimated cost of instantiating and iterating throught a VTI.
static double defaultEstimatedRowCount
          A useful constant: the default estimated number of rows returned by a VTI.
 
Method Summary
 double getEstimatedCostPerInstantiation(VTIEnvironment vtiEnvironment)
          Get the estimated cost for a single instantiation of a VTI.
 double getEstimatedRowCount(VTIEnvironment vtiEnvironment)
          Get the estimated row count for a single scan of a VTI.
 boolean supportsMultipleInstantiations(VTIEnvironment vtiEnvironment)
          Find out if the ResultSet of the VTI can be instantiated multiple times.
 

Field Detail

defaultEstimatedRowCount

public static final double defaultEstimatedRowCount
A useful constant: the default estimated number of rows returned by a VTI.

See Also:
Constant Field Values

defaultEstimatedCost

public static final double defaultEstimatedCost
A useful constant: The default estimated cost of instantiating and iterating throught a VTI.

See Also:
Constant Field Values
Method Detail

getEstimatedRowCount

public double getEstimatedRowCount(VTIEnvironment vtiEnvironment)
                            throws java.sql.SQLException
Get the estimated row count for a single scan of a VTI.

Parameters:
vtiEnvironment - The VTIEnvironment.
Returns:
The estimated row count for a single scan of a VTI.
Throws:
java.sql.SQLException - thrown if the costing fails.

getEstimatedCostPerInstantiation

public double getEstimatedCostPerInstantiation(VTIEnvironment vtiEnvironment)
                                        throws java.sql.SQLException
Get the estimated cost for a single instantiation of a VTI.

Parameters:
vtiEnvironment - The VTIEnvironment.
Returns:
The estimated cost for a single instantiation of a VTI.
Throws:
java.sql.SQLException - thrown if the costing fails.

supportsMultipleInstantiations

public boolean supportsMultipleInstantiations(VTIEnvironment vtiEnvironment)
                                       throws java.sql.SQLException
Find out if the ResultSet of the VTI can be instantiated multiple times.

Parameters:
vtiEnvironment - The VTIEnvironment.
Returns:
True if the ResultSet can be instantiated multiple times, false if can only be instantiated once.
Throws:
java.sql.SQLException - thrown if the costing fails.

Built on Mon 2007-06-04 09:58:47+0400, from revision ???

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.