Package org.h2.table
Class Plan
java.lang.Object
org.h2.table.Plan
A possible query execution plan. The time required to execute a query depends
on the order the tables are accessed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Expression[]
private final TableFilter[]
private final TableFilter[]
private final HashMap
<TableFilter, PlanItem> -
Constructor Summary
ConstructorsConstructorDescriptionPlan
(TableFilter[] filters, int count, Expression condition) Create a query plan with the given order. -
Method Summary
Modifier and TypeMethodDescriptiondouble
calculateCost
(SessionLocal session, AllColumnsForPlan allColumnsSet) Calculate the cost of this query plan.The the list of tables.getItem
(TableFilter filter) Get the plan item for the given table.void
Remove all index conditions that can not be used.private void
setEvaluatable
(TableFilter filter, boolean b)
-
Field Details
-
filters
-
planItems
-
allConditions
-
allFilters
-
-
Constructor Details
-
Plan
Create a query plan with the given order.- Parameters:
filters
- the tables of the querycount
- the number of table itemscondition
- the condition in the WHERE clause
-
-
Method Details
-
getItem
Get the plan item for the given table.- Parameters:
filter
- the table- Returns:
- the plan item
-
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
Calculate the cost of this query plan.- Parameters:
session
- the sessionallColumnsSet
- calculates all columns on-demand- Returns:
- the cost
-
setEvaluatable
-