system.interfaces.query_optimization.planning module

Abstract plan-table interface for join-order enumeration.

class system.interfaces.query_optimization.planning.PlanTable[source]

Bases: ABC

A plan table stores information relevant for the enumeration to make use of dynamic programming. For example, it can store for each problem the corresponding costs and plan.

update_table(s1: Problem, s2: Problem, cardinality_table: CardinalityTable, cost_function: CostFunction)[source]

Updates the table for the given csg-cmp pair (S1, S2) :param s1: The csg problem. :param s2: The cmp problem. :param cardinality_table: The cardinality table to be used. :param cost_function: The cost function to be used.

abstractmethod get_costs_for_problem(problem: Problem)[source]

Returns the current best costs for the problem. :param problem: The problem. :return: The costs for the problem.

abstractmethod get_plan_for_problem(problem: Problem)[source]

Returns the current best plan for the problem. :param problem: The problem. :return: The plan for the problem.