mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Public Types | Public Member Functions
m::CostFunctionCout Struct Reference

Implements the cassical, widely used cost function C_out from Sophie Cluet and Guido Moerkotte. More...

#include <CostFunctionCout.hpp>

Inheritance diagram for m::CostFunctionCout:
[legend]
Collaboration diagram for m::CostFunctionCout:
[legend]

Public Types

using Subproblem = SmallBitset
 

Public Member Functions

template<typename PlanTable >
double operator() (calculate_filter_cost_tag, const PlanTable &PT, const QueryGraph &G, const CardinalityEstimator &CE, Subproblem sub, const cnf::CNF &condition) const
 
template<typename PlanTable >
double operator() (calculate_join_cost_tag, const PlanTable &PT, const QueryGraph &G, const CardinalityEstimator &CE, Subproblem left, Subproblem right, const cnf::CNF &condition) const
 
template<typename PlanTable >
double operator() (calculate_grouping_cost_tag, const PlanTable &PT, const QueryGraph &G, const CardinalityEstimator &CE, Subproblem sub, const std::vector< const ast::Expr * > &group_by) const
 
template<typename PlanTable >
double calculate_filter_cost (const QueryGraph &G, const PlanTable &PT, const CardinalityEstimator &CE, Subproblem sub, const cnf::CNF &condition) const
 Returns the total cost of performing a Filter operation.
 
template<typename PlanTable >
double calculate_join_cost (const QueryGraph &G, const PlanTable &PT, const CardinalityEstimator &CE, Subproblem left, Subproblem right, const cnf::CNF &condition) const
 Returns the total cost of performing a Join operation.
 
template<typename PlanTable >
double calculate_grouping_cost (const QueryGraph &G, const PlanTable &PT, const CardinalityEstimator &CE, Subproblem sub, const std::vector< const ast::Expr * > &group_by) const
 Returns the total cost of performing a Grouping operation.
 

Detailed Description

Implements the cassical, widely used cost function C_out from Sophie Cluet and Guido Moerkotte.

"On the complexity of generating optimal left-deep processing trees with cross products." 1995. C_out provides the adjacent sequence interchange (ASI) property.

Definition at line 14 of file CostFunctionCout.hpp.

Member Typedef Documentation

◆ Subproblem

Definition at line 41 of file CostFunction.hpp.

Member Function Documentation

◆ calculate_filter_cost()

template<typename PlanTable >
double m::CostFunction::calculate_filter_cost ( const QueryGraph G,
const PlanTable &  PT,
const CardinalityEstimator CE,
Subproblem  sub,
const cnf::CNF condition 
) const
inlineinherited

Returns the total cost of performing a Filter operation.

Definition at line 53 of file CostFunction.hpp.

◆ calculate_grouping_cost()

template<typename PlanTable >
double m::CostFunction::calculate_grouping_cost ( const QueryGraph G,
const PlanTable &  PT,
const CardinalityEstimator CE,
Subproblem  sub,
const std::vector< const ast::Expr * > &  group_by 
) const
inlineinherited

Returns the total cost of performing a Grouping operation.

Definition at line 70 of file CostFunction.hpp.

◆ calculate_join_cost()

template<typename PlanTable >
double m::CostFunction::calculate_join_cost ( const QueryGraph G,
const PlanTable &  PT,
const CardinalityEstimator CE,
Subproblem  left,
Subproblem  right,
const cnf::CNF condition 
) const
inlineinherited

◆ operator()() [1/3]

template<typename PlanTable >
double m::CostFunctionCout::operator() ( calculate_filter_cost_tag  ,
const PlanTable &  PT,
const QueryGraph G,
const CardinalityEstimator CE,
Subproblem  sub,
const cnf::CNF condition 
) const
inline

◆ operator()() [2/3]

template<typename PlanTable >
double m::CostFunctionCout::operator() ( calculate_grouping_cost_tag  ,
const PlanTable &  PT,
const QueryGraph G,
const CardinalityEstimator CE,
Subproblem  sub,
const std::vector< const ast::Expr * > &  group_by 
) const
inline

◆ operator()() [3/3]

template<typename PlanTable >
double m::CostFunctionCout::operator() ( calculate_join_cost_tag  ,
const PlanTable &  PT,
const QueryGraph G,
const CardinalityEstimator CE,
Subproblem  left,
Subproblem  right,
const cnf::CNF condition 
) const
inline

The documentation for this struct was generated from the following file: