![]() |
mutable
A Database System for Research and Fast Prototyping
|
This table represents all explored plans with their sub-plans, estimated size, cost, and further optional properties. More...
#include <PlanTable.hpp>
Public Types | |
| using | size_type = std::size_t |
| using | Subproblem = QueryGraph::Subproblem |
| using | cost_type = decltype(PlanTableEntry::cost) |
| using | actual_type = ConcreteType |
Public Member Functions | |
| PlanTableLargeAndSparse ()=default | |
| PlanTableLargeAndSparse (size_type num_sources, size_type num_additional_entries=0) | |
| PlanTableLargeAndSparse (const QueryGraph &G) | |
| PlanTableLargeAndSparse (const PlanTableLargeAndSparse &)=delete | |
| PlanTableLargeAndSparse (PlanTableLargeAndSparse &&other) | |
| PlanTableLargeAndSparse & | operator= (PlanTableLargeAndSparse &&other) |
| bool | operator== (const PlanTableLargeAndSparse &other) const |
| bool | operator!= (const PlanTableLargeAndSparse &other) const |
| size_type | num_sources () const |
| size_type | size () const |
| PlanTableEntry & | at (Subproblem s) |
| const PlanTableEntry & | at (Subproblem s) const |
| PlanTableEntry & | operator[] (Subproblem s) |
| const PlanTableEntry & | operator[] (Subproblem s) const |
| bool | has_plan (Subproblem s) const |
| void | reset_costs () |
| void | dump (std::ostream &out) const |
| void | dump () const |
| bool | operator== (const PlanTableBase &other) const |
| Returns true if two tables contain the exact same entries. | |
| bool | operator!= (const PlanTableBase &other) const |
| Returns true if two tables differ in at least one entry. | |
| PlanTableEntry & | get_final () |
| Returns the entry for the final plan, i.e. | |
| const PlanTableEntry & | get_final () const |
| Returns the entry for the final plan, i.e. | |
| cost_type | c (Subproblem s) const |
Returns the cost of the best plan to compute s. | |
| void | update (const QueryGraph &G, const CardinalityEstimator &CE, const CostFunction &CF, Subproblem left, Subproblem right, const cnf::CNF &condition) |
Update the entry for left joined with right (left|right) by considering plan left join right. | |
| actual_type & | actual () |
| const actual_type & | actual () const |
Private Member Functions | |
| auto | begin () |
| auto | end () |
Static Private Member Functions | |
| static size_type | OnoLohmannCycle (size_type N) |
Computes the number of connected subgraphs (CSGs) of a query graph with N relations and cycle topology. | |
Private Attributes | |
| size_type | num_sources_ |
| |
| std::unordered_map< Subproblem, PlanTableEntry, SubproblemHash > | table_ |
| |
| friend | CRTPBaseType< actual_type, TParams... > |
Friends | |
| struct | PlanTableDecorator< PlanTableLargeAndSparse > |
| void | swap (PlanTableLargeAndSparse &first, PlanTableLargeAndSparse &second) |
| std::ostream &M_EXPORT | operator<< (std::ostream &out, const PlanTableLargeAndSparse &PT) |
This table represents all explored plans with their sub-plans, estimated size, cost, and further optional properties.
The PlanTableLargeAndSparse is optimized for "large" queries, i.e. queries of many relations or with a sparse query graph.
Definition at line 283 of file PlanTable.hpp.
|
inherited |
|
inherited |
Definition at line 75 of file PlanTable.hpp.
|
inherited |
Definition at line 73 of file PlanTable.hpp.
|
inherited |
Definition at line 74 of file PlanTable.hpp.
|
default |
|
inlineexplicit |
Definition at line 301 of file PlanTable.hpp.
|
inlineexplicit |
Definition at line 305 of file PlanTable.hpp.
|
delete |
|
inline |
Definition at line 310 of file PlanTable.hpp.
References m::swap().
|
inlineinherited |
Definition at line 52 of file crtp.hpp.
Referenced by m::pe::hs::search_states::Base< Actual >::operator!=(), m::pe::hs::search_states::Base< Actual >::operator<(), m::pe::hs::search_states::Base< Actual >::operator==(), and m::PlanTableBase< Actual >::operator==().
|
inlineinherited |
|
inline |
Definition at line 331 of file PlanTable.hpp.
|
inline |
|
inlineprivate |
Definition at line 358 of file PlanTable.hpp.
|
inlineinherited |
Returns the cost of the best plan to compute s.
Definition at line 112 of file PlanTable.hpp.
| void PlanTableLargeAndSparse::dump | ( | ) | const |
| void PlanTableLargeAndSparse::dump | ( | std::ostream & | out | ) | const |
Definition at line 145 of file PlanTable.cpp.
|
inlineprivate |
Definition at line 359 of file PlanTable.hpp.
|
inlineinherited |
Returns the entry for the final plan, i.e.
the plan that joins all relations.
Definition at line 107 of file PlanTable.hpp.
|
inlineinherited |
Returns the entry for the final plan, i.e.
the plan that joins all relations.
Definition at line 109 of file PlanTable.hpp.
|
inline |
Definition at line 339 of file PlanTable.hpp.
References M_insist, and m::SmallBitset::size().
|
inline |
Definition at line 328 of file PlanTable.hpp.
Referenced by operator==().
Computes the number of connected subgraphs (CSGs) of a query graph with N relations and cycle topology.
Definition at line 369 of file PlanTable.hpp.
|
inlineinherited |
Returns true if two tables differ in at least one entry.
Definition at line 91 of file PlanTable.hpp.
|
inline |
Definition at line 326 of file PlanTable.hpp.
|
inline |
Definition at line 312 of file PlanTable.hpp.
References m::swap().
|
inlineinherited |
Returns true if two tables contain the exact same entries.
Definition at line 89 of file PlanTable.hpp.
|
inline |
Definition at line 314 of file PlanTable.hpp.
References num_sources(), and table_.
|
inline |
Definition at line 334 of file PlanTable.hpp.
|
inline |
Definition at line 335 of file PlanTable.hpp.
|
inline |
Definition at line 350 of file PlanTable.hpp.
|
inline |
Definition at line 329 of file PlanTable.hpp.
|
inlineinherited |
Update the entry for left joined with right (left|right) by considering plan left join right.
The entry's plan and cost is changed only if the plan's cost is less than the cost of the currently best plan.
Definition at line 119 of file PlanTable.hpp.
|
friend |
|
friend |
Definition at line 277 of file PlanTable.hpp.
|
friend |
Definition at line 294 of file PlanTable.hpp.
|
privateinherited |
|
private |
the number of
DataSources in the query
Definition at line 289 of file PlanTable.hpp.
|
private |