Package org.h2.table

# Class Plan

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

public class Plan extends 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
Description
`Plan(TableFilter[] filters, int count, Expression condition)`
Create a query plan with the given order.

## Method Summary

Modifier and Type
Method
Description
`double`
`calculateCost(SessionLocal session, AllColumnsForPlan allColumnsSet, boolean isSelectCommand)`
Calculate the cost of this query plan.
`TableFilter[]`
`getFilters()`
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 Details

### 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 Details

### 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 list of tables.

Returns:
  the array of tables

### removeUnusableIndexConditions

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

### calculateCost

public double calculateCost(SessionLocal session, AllColumnsForPlan allColumnsSet, boolean isSelectCommand)
Calculate the cost of this query plan.

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