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.
  • Field Details

  • 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 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
    • setEvaluatable

      private void setEvaluatable(TableFilter filter, boolean b)