org.h2.table
Class Plan

java.lang.Object
  extended by org.h2.table.Plan

public class Plan
extends java.lang.Object

A possible query execution plan. The time required to execute a query depends on the order the tables are accessed.


Constructor Summary
Plan(TableFilter[] filters, int count, Expression condition)
          Create a query plan with the given order.
 
Method Summary
 double calculateCost(Session session)
          Calculate the cost of this query plan.
 TableFilter[] getFilters()
          The the list of tables.
 PlanItem getItem(TableFilter filter)
          Get the plan item for the given table.
 void removeUnusableIndexConditions()
          Remove all index conditions that can not be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Plan

public Plan(TableFilter[] filters,
            int count,
            Expression condition)
Create a query plan with the given order.

Parameters:
filters - the tables of the query
count - the number of table items
condition - the condition in the WHERE clause
Method Detail

getItem

public PlanItem getItem(TableFilter filter)
Get the plan item for the given table.

Parameters:
filter - the table
Returns:
the plan item

getFilters

public TableFilter[] getFilters()
The the list of tables.

Returns:
the list of tables

removeUnusableIndexConditions

public void removeUnusableIndexConditions()
Remove all index conditions that can not be used.


calculateCost

public double calculateCost(Session session)
Calculate the cost of this query plan.

Parameters:
session - the session
Returns:
the cost