MySQL 9.1.0
Source Code Documentation
qep_row Class Reference

Helper class for table property buffering. More...

#include <opt_explain_format.h>

Inheritance diagram for qep_row:
[legend]

Classes

struct  column
 A wrapper for numeric table properties. More...
 
struct  extra
 Part of traditional "extra" column or related hierarchical property. More...
 
struct  mem_root_str
 Helper class to keep string data in MEM_ROOT before passing to Item_string. More...
 

Public Member Functions

 qep_row ()
 
virtual ~qep_row ()=default
 
void cleanup ()
 
virtual void register_where_subquery (Query_expression *subquery)
 Remember a subquery's unit. More...
 
void format_extra (Opt_trace_object *obj)
 

Public Attributes

column< uint > col_id
 "id" column: seq. number of SELECT within the query More...
 
column< enum_explain_typecol_select_type
 "select_type" column More...
 
mem_root_str col_table_name
 "table" to which the row of output refers More...
 
List< const char > col_partitions
 "partitions" column More...
 
mem_root_str col_join_type
 "type" column, see join_type_str array More...
 
List< const char > col_possible_keys
 "possible_keys": comma-separated list More...
 
mem_root_str col_key
 "key" column: index that is actually decided to use More...
 
mem_root_str col_key_len
 "key_length" column: length of the "key" above More...
 
List< const char > col_ref
 "ref":columns/constants which are compared to "key" More...
 
column< float > col_filtered
 "filtered": % of rows filtered by condition More...
 
List< extracol_extra
 "extra" column (traditional) or property list More...
 
mem_root_str col_message
 replaces "Extra" column if not empty More...
 
mem_root_str col_attached_condition
 former "Using where" More...
 
column< ulonglongcol_rows
 "rows": estimated number of examined table rows per single scan More...
 
column< ulonglongcol_prefix_rows
 "rows": estimated number of examined table rows per query More...
 
column< double > col_read_cost
 Time to read the table. More...
 
column< double > col_prefix_cost
 Cost of the partial join including this table. More...
 
column< double > col_cond_cost
 Cost of evaluating conditions on this table per query. More...
 
mem_root_str col_data_size_query
 Size of data expected to be read per query. More...
 
List< const char > col_used_columns
 List of used columns. More...
 
List< const char > col_partial_update_columns
 List of columns that can be updated using partial update. More...
 
uint query_block_id
 query block id for materialized subqueries More...
 
List< opt_explain_json_namespace::contextderived_from
 List of "derived" subquery trees. More...
 
List< const char > col_key_parts
 used parts of the key More...
 
bool is_dependent
 
bool is_cacheable
 
bool using_temporary
 
enum_mod_type mod_type
 
bool is_materialized_from_subquery
 
uint derived_clone_id
 If a clone of a materialized derived table, this is the ID of the first underlying query block of the first materialized derived table. More...
 
List< Window > * m_windows
 Windows to describe in this node. More...
 

Private Member Functions

 qep_row (const qep_row &x)
 
qep_rowoperator= (const qep_row &x)
 

Detailed Description

Helper class for table property buffering.

For traditional EXPLAIN this structure contains cached data for a single output row.

For hierarchical EXPLAIN this structure contains property values for a single CTX_TABLE/CTX_QEP_TAB context node of the intermediate tree.

Constructor & Destructor Documentation

◆ qep_row() [1/2]

qep_row::qep_row ( const qep_row x)
explicitprivate

◆ qep_row() [2/2]

qep_row::qep_row ( )
inline

◆ ~qep_row()

virtual qep_row::~qep_row ( )
virtualdefault

Member Function Documentation

◆ cleanup()

void qep_row::cleanup ( )
inline

◆ format_extra()

void qep_row::format_extra ( Opt_trace_object obj)

◆ operator=()

qep_row & qep_row::operator= ( const qep_row x)
private

◆ register_where_subquery()

virtual void qep_row::register_where_subquery ( Query_expression subquery)
inlinevirtual

Remember a subquery's unit.

JOIN_TAB inside a JOIN, a table in a join-less query (single-table UPDATE/DELETE) or a table that's optimized out may have a WHERE condition. We create the Explain_context of such a JOIN_TAB or table when the Explain_context objects of its in-WHERE subqueries don't exist. This function collects unit pointers of WHERE subqueries that are associated with the current JOIN_TAB or table. Then we can match these units with units of newly-created Explain_context objects of WHERE subqueries.

Parameters
subqueryWHERE clause subquery's unit

Reimplemented in opt_explain_json_namespace::join_tab_ctx.

Member Data Documentation

◆ col_attached_condition

mem_root_str qep_row::col_attached_condition

former "Using where"

◆ col_cond_cost

column<double> qep_row::col_cond_cost

Cost of evaluating conditions on this table per query.

◆ col_data_size_query

mem_root_str qep_row::col_data_size_query

Size of data expected to be read per query.

◆ col_extra

List<extra> qep_row::col_extra

"extra" column (traditional) or property list

◆ col_filtered

column<float> qep_row::col_filtered

"filtered": % of rows filtered by condition

◆ col_id

column<uint> qep_row::col_id

"id" column: seq. number of SELECT within the query

◆ col_join_type

mem_root_str qep_row::col_join_type

"type" column, see join_type_str array

◆ col_key

mem_root_str qep_row::col_key

"key" column: index that is actually decided to use

◆ col_key_len

mem_root_str qep_row::col_key_len

"key_length" column: length of the "key" above

◆ col_key_parts

List<const char> qep_row::col_key_parts

used parts of the key

◆ col_message

mem_root_str qep_row::col_message

replaces "Extra" column if not empty

◆ col_partial_update_columns

List<const char> qep_row::col_partial_update_columns

List of columns that can be updated using partial update.

◆ col_partitions

List<const char> qep_row::col_partitions

"partitions" column

◆ col_possible_keys

List<const char> qep_row::col_possible_keys

"possible_keys": comma-separated list

◆ col_prefix_cost

column<double> qep_row::col_prefix_cost

Cost of the partial join including this table.

◆ col_prefix_rows

column<ulonglong> qep_row::col_prefix_rows

"rows": estimated number of examined table rows per query

◆ col_read_cost

column<double> qep_row::col_read_cost

Time to read the table.

◆ col_ref

List<const char> qep_row::col_ref

"ref":columns/constants which are compared to "key"

◆ col_rows

column<ulonglong> qep_row::col_rows

"rows": estimated number of examined table rows per single scan

◆ col_select_type

column<enum_explain_type> qep_row::col_select_type

"select_type" column

◆ col_table_name

mem_root_str qep_row::col_table_name

"table" to which the row of output refers

◆ col_used_columns

List<const char> qep_row::col_used_columns

List of used columns.

◆ derived_clone_id

uint qep_row::derived_clone_id

If a clone of a materialized derived table, this is the ID of the first underlying query block of the first materialized derived table.

0 otherwise.

◆ derived_from

List<opt_explain_json_namespace::context> qep_row::derived_from

List of "derived" subquery trees.

◆ is_cacheable

bool qep_row::is_cacheable

◆ is_dependent

bool qep_row::is_dependent

◆ is_materialized_from_subquery

bool qep_row::is_materialized_from_subquery

◆ m_windows

List<Window>* qep_row::m_windows

Windows to describe in this node.

◆ mod_type

enum_mod_type qep_row::mod_type

◆ query_block_id

uint qep_row::query_block_id

query block id for materialized subqueries

◆ using_temporary

bool qep_row::using_temporary

The documentation for this class was generated from the following files: