![]() |
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 | allocator_type = malloc_allocator |
| using | size_type = std::size_t |
| using | Subproblem = QueryGraph::Subproblem |
| using | cost_type = decltype(PlanTableEntry::cost) |
| using | actual_type = ConcreteType |
Public Member Functions | |
| PlanTableSmallOrDense ()=default | |
| PlanTableSmallOrDense (size_type num_sources, size_type num_additional_entries=0, allocator_type allocator=allocator_type()) | |
| PlanTableSmallOrDense (const QueryGraph &G, allocator_type allocator=allocator_type()) | |
| PlanTableSmallOrDense (const PlanTableSmallOrDense &)=delete | |
| PlanTableSmallOrDense (PlanTableSmallOrDense &&other) | |
| ~PlanTableSmallOrDense () | |
| PlanTableSmallOrDense & | operator= (PlanTableSmallOrDense &&other) |
| bool | operator== (const PlanTableSmallOrDense &other) const |
| bool | operator!= (const PlanTableSmallOrDense &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 () |
Private Attributes | |
| allocator_type | allocator_ |
| |
| size_type | num_sources_ |
| |
| size_type | num_additional_entries_ |
| |
| std::unique_ptr< PlanTableEntry[]> | table_ = nullptr |
| |
| friend | CRTPBaseType< actual_type, TParams... > |
Friends | |
| struct | PlanTableDecorator< PlanTableSmallOrDense > |
| void | swap (PlanTableSmallOrDense &first, PlanTableSmallOrDense &second) |
| std::ostream &M_EXPORT | operator<< (std::ostream &out, const PlanTableSmallOrDense &PT) |
This table represents all explored plans with their sub-plans, estimated size, cost, and further optional properties.
The PlanTableSmallOrDense is optimized for "small" queries, i.e. queries of few relations and/or a dense query graph.
Definition at line 179 of file PlanTable.hpp.
|
inherited |
Definition at line 183 of file PlanTable.hpp.
|
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 205 of file PlanTable.hpp.
|
inlineexplicit |
Definition at line 217 of file PlanTable.hpp.
|
delete |
|
inline |
Definition at line 222 of file PlanTable.hpp.
References m::swap().
|
inline |
Definition at line 224 of file PlanTable.hpp.
References m::allocator< Actual >::dispose().
|
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 248 of file PlanTable.hpp.
References M_insist.
|
inline |
|
inlineprivate |
Definition at line 270 of file PlanTable.hpp.
|
inlineinherited |
Returns the cost of the best plan to compute s.
Definition at line 112 of file PlanTable.hpp.
| void PlanTableSmallOrDense::dump | ( | ) | const |
| void PlanTableSmallOrDense::dump | ( | std::ostream & | out | ) | const |
Definition at line 71 of file PlanTable.cpp.
|
inlineprivate |
Definition at line 271 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 254 of file PlanTable.hpp.
References M_insist, and m::SmallBitset::size().
|
inline |
Definition at line 245 of file PlanTable.hpp.
Referenced by operator==().
|
inlineinherited |
Returns true if two tables differ in at least one entry.
Definition at line 91 of file PlanTable.hpp.
|
inline |
Definition at line 243 of file PlanTable.hpp.
|
inline |
Definition at line 232 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 234 of file PlanTable.hpp.
References num_sources(), and size().
|
inline |
Definition at line 251 of file PlanTable.hpp.
|
inline |
Definition at line 252 of file PlanTable.hpp.
|
inline |
Definition at line 261 of file PlanTable.hpp.
References m::SmallBitset::is_singleton().
|
inline |
Definition at line 246 of file PlanTable.hpp.
Referenced by operator==().
|
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 173 of file PlanTable.hpp.
|
friend |
Definition at line 196 of file PlanTable.hpp.
|
private |
the allocator
Definition at line 187 of file PlanTable.hpp.
|
privateinherited |
|
private |
the number of additional entries
thisshould contain
Definition at line 191 of file PlanTable.hpp.
|
private |
the number of
DataSources in the query
Definition at line 189 of file PlanTable.hpp.
|
private |
the table of problem plans, sizes, and costs
Definition at line 193 of file PlanTable.hpp.