org.h2.table

## Class Plan

- java.lang.Object
- - 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

Constructors
Constructor and Description
`Plan(TableFilter[] filters, int count, Expression condition)` Create a query plan with the given order.

### Method Summary

All Methods Instance Methods Concrete Methods
`double` `calculateCost(SessionLocal session, AllColumnsForPlan allColumnsSet)` 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(SessionLocal session,
                                AllColumnsForPlan allColumnsSet)

Calculate the cost of this query plan.

Parameters:
  `session` - the session
  `allColumnsSet` - calculates all columns on-demand
Returns:
  the cost