MySQL 9.1.0
Source Code Documentation
|
Query optimization plan node. More...
#include <sql_select.h>
Public Attributes | |
Table_ref * | table_ref |
points to table reference More... | |
COND_EQUAL * | cond_equal |
multiple equalities for the on expression More... | |
double | worst_seeks |
The maximum value for the cost of seek operations for key lookup during ref access. More... | |
Key_map | const_keys |
Keys with constant part. More... | |
Key_map | checked_keys |
Keys checked. More... | |
Key_map | skip_scan_keys |
Keys which can be used for skip scan access. More... | |
Key_map | needed_reg |
Key_map | quick_order_tested |
Used to avoid repeated range analysis for the same key in test_if_skip_sort_order(). More... | |
ha_rows | found_records |
double | read_time |
table_map | dependent |
The set of tables that this table depends on. More... | |
table_map | key_dependent |
The set of tables that are referenced by key from this table. More... | |
uint | used_fieldlength |
enum quick_type | use_quick |
uint | m_use_join_cache |
Join buffering strategy. More... | |
Table_ref * | emb_sj_nest |
nested_join_map | embedding_map |
uint | join_cache_flags |
Flags from SE's MRR implementation, to be used by JOIN_CACHE. More... | |
bool | reversed_access |
true <=> AM will scan backward More... | |
Private Member Functions | |
JOIN_TAB (const JOIN_TAB &) | |
JOIN_TAB & | operator= (const JOIN_TAB &) |
Private Attributes | |
Key_use * | m_keyuse |
pointer to first used key More... | |
Item ** | m_join_cond_ref |
Pointer to the associated join condition: More... | |
Additional Inherited Members | |
Protected Attributes inherited from QEP_shared_owner | |
QEP_shared * | m_qs |
Query optimization plan node.
Specifies:
|
inline |
|
private |
|
inline |
|
inline |
|
inline |
Set the combined condition for a table (may be performed several times)
|
inline |
Sets join condition.
|
inline |
|
inline |
|
inline |
Key_map JOIN_TAB::checked_keys |
Keys checked.
COND_EQUAL* JOIN_TAB::cond_equal |
multiple equalities for the on expression
Key_map JOIN_TAB::const_keys |
Keys with constant part.
Subset of keys.
table_map JOIN_TAB::dependent |
The set of tables that this table depends on.
Used for outer join and straight join dependencies.
Table_ref* JOIN_TAB::emb_sj_nest |
nested_join_map JOIN_TAB::embedding_map |
ha_rows JOIN_TAB::found_records |
uint JOIN_TAB::join_cache_flags |
Flags from SE's MRR implementation, to be used by JOIN_CACHE.
table_map JOIN_TAB::key_dependent |
The set of tables that are referenced by key from this table.
|
private |
Pointer to the associated join condition:
|
private |
pointer to first used key
uint JOIN_TAB::m_use_join_cache |
Join buffering strategy.
After optimization it contains chosen join buffering strategy (if any).
Key_map JOIN_TAB::needed_reg |
Key_map JOIN_TAB::quick_order_tested |
Used to avoid repeated range analysis for the same key in test_if_skip_sort_order().
This would otherwise happen if the best range access plan found for a key is turned down. quick_order_tested is cleared every time the select condition for this JOIN_TAB changes since a new condition may give another plan and cost from range analysis.
double JOIN_TAB::read_time |
bool JOIN_TAB::reversed_access |
true <=> AM will scan backward
Key_map JOIN_TAB::skip_scan_keys |
Keys which can be used for skip scan access.
We store it separately from tab->const_keys & join_tab->keys() to avoid unnecessary printing of the prossible keys in EXPLAIN output as some of these keys can be marked not usable for skip scan later. More strict check for prossible keys is performed in get_best_skip_scan() function.
Table_ref* JOIN_TAB::table_ref |
points to table reference
enum quick_type JOIN_TAB::use_quick |
uint JOIN_TAB::used_fieldlength |
double JOIN_TAB::worst_seeks |
The maximum value for the cost of seek operations for key lookup during ref access.
The cost model for ref access assumes every key lookup will cause reading a block from disk. With many key lookups into the same table, most of the blocks will soon be in a memory buffer. As a consequence, there will in most cases be an upper limit on the number of actual disk accesses the ref access will cause. This variable is used for storing a maximum cost estimate for the disk accesses for ref access. It is used for limiting the cost estimate for ref access to a more realistic value than assuming every key lookup causes a random disk access. Without having this upper limit for the cost of ref access, table scan would be more likely to be chosen for cases where ref access performs better.