MySQL 8.0.39
Source Code Documentation
|
Struct NESTED_JOIN is used to represent how tables are connected through outer join operations and semi-join operations to form a query block. More...
#include <nested_join.h>
Public Member Functions | |
NESTED_JOIN () | |
Public Attributes | |
mem_root_deque< Table_ref * > | m_tables |
list of tables referenced in the nested join More... | |
table_map | used_tables {0} |
table_map | not_null_tables {0} |
plan_idx | first_nested {0} |
Used for pointing out the first table in the plan being covered by this join nest. More... | |
bool | natural_join_processed {false} |
Set to true when natural join or using information has been processed. More... | |
uint | nj_total {0} |
Number of tables and outer join nests administered by this nested join object for the sake of cost analysis. More... | |
uint | nj_counter {0} |
Used to count tables in the nested join in 2 isolated places: More... | |
nested_join_map | nj_map {0} |
Bit identifying this nested join. More... | |
table_map | sj_depends_on {0} |
Tables outside the semi-join that are used within the semi-join's ON condition (ie. More... | |
table_map | sj_corr_tables {0} |
Outer non-trivially correlated tables, a true subset of sj_depends_on. More... | |
uint | query_block_id {0} |
Query block id if this struct is generated from a subquery transform. More... | |
uint | sj_enabled_strategies {0} |
Bitmap of which strategies are enabled for this semi-join nest. More... | |
mem_root_deque< Item * > | sj_outer_exprs |
mem_root_deque< Item * > | sj_inner_exprs |
Semijoin_mat_optimize | sjm |
Struct NESTED_JOIN is used to represent how tables are connected through outer join operations and semi-join operations to form a query block.
Out of the parser, inner joins are also represented by NESTED_JOIN structs, but these are later flattened out by simplify_joins(). Some outer join nests are also flattened, when it can be determined that they can be processed as inner joins instead of outer joins.
|
inline |
plan_idx NESTED_JOIN::first_nested {0} |
Used for pointing out the first table in the plan being covered by this join nest.
It is used exclusively within make_outerjoin_info().
mem_root_deque<Table_ref *> NESTED_JOIN::m_tables |
list of tables referenced in the nested join
bool NESTED_JOIN::natural_join_processed {false} |
Set to true when natural join or using information has been processed.
uint NESTED_JOIN::nj_counter {0} |
Used to count tables in the nested join in 2 isolated places:
nested_join_map NESTED_JOIN::nj_map {0} |
Bit identifying this nested join.
Only nested joins representing the outer join structure need this, other nests have bit set to zero.
uint NESTED_JOIN::nj_total {0} |
Number of tables and outer join nests administered by this nested join object for the sake of cost analysis.
Includes direct member tables as well as tables included through semi-join nests, but notice that semi-join nests themselves are not counted.
table_map NESTED_JOIN::not_null_tables {0} |
uint NESTED_JOIN::query_block_id {0} |
Query block id if this struct is generated from a subquery transform.
table_map NESTED_JOIN::sj_corr_tables {0} |
Outer non-trivially correlated tables, a true subset of sj_depends_on.
Also contains lateral dependencies from materialized derived tables contained inside the semi-join inner tables.
table_map NESTED_JOIN::sj_depends_on {0} |
Tables outside the semi-join that are used within the semi-join's ON condition (ie.
the subquery WHERE clause and optional IN equalities). Also contains lateral dependencies from materialized derived tables contained inside the semi-join inner tables.
uint NESTED_JOIN::sj_enabled_strategies {0} |
Bitmap of which strategies are enabled for this semi-join nest.
mem_root_deque<Item *> NESTED_JOIN::sj_inner_exprs |
mem_root_deque<Item *> NESTED_JOIN::sj_outer_exprs |
Semijoin_mat_optimize NESTED_JOIN::sjm |
table_map NESTED_JOIN::used_tables {0} |