MySQL 8.4.3
Source Code Documentation
opt_explain_format.h File Reference

EXPLAIN FORMAT=<format> <command>. More...

#include <assert.h>
#include <sys/types.h>
#include <cstring>
#include <optional>
#include <string_view>
#include "my_alloc.h"
#include "my_compiler.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "sql/parse_tree_node_base.h"
#include "sql/sql_list.h"
#include "sql_string.h"

Go to the source code of this file.

Classes

class  Lazy
 Emulate lazy computation. More...
 
struct  Explain_context
 Base class for all EXPLAIN context descriptor classes. More...
 
class  qep_row
 Helper class for table property buffering. More...
 
struct  qep_row::column< T >
 A wrapper for numeric table properties. More...
 
struct  qep_row::mem_root_str
 Helper class to keep string data in MEM_ROOT before passing to Item_string. More...
 
struct  qep_row::extra
 Part of traditional "extra" column or related hierarchical property. More...
 
class  Explain_format_flags
 
class  Explain_format
 Base class for structured and hierarchical EXPLAIN output formatters. More...
 

Namespaces

namespace  opt_explain_json_namespace
 

Enumerations

enum  Extra_tag {
  ET_none , ET_USING_TEMPORARY , ET_USING_FILESORT , ET_USING_INDEX_CONDITION ,
  ET_USING , ET_RANGE_CHECKED_FOR_EACH_RECORD , ET_USING_PUSHED_CONDITION , ET_USING_WHERE ,
  ET_NOT_EXISTS , ET_USING_MRR , ET_USING_INDEX , ET_FULL_SCAN_ON_NULL_KEY ,
  ET_USING_INDEX_FOR_GROUP_BY , ET_USING_INDEX_FOR_SKIP_SCAN , ET_DISTINCT , ET_LOOSESCAN ,
  ET_START_TEMPORARY , ET_END_TEMPORARY , ET_FIRST_MATCH , ET_MATERIALIZE ,
  ET_START_MATERIALIZE , ET_END_MATERIALIZE , ET_SCAN , ET_USING_JOIN_BUFFER ,
  ET_CONST_ROW_NOT_FOUND , ET_UNIQUE_ROW_NOT_FOUND , ET_IMPOSSIBLE_ON_CONDITION , ET_PUSHED_JOIN ,
  ET_FT_HINTS , ET_BACKWARD_SCAN , ET_RECURSIVE , ET_TABLE_FUNCTION ,
  ET_SKIP_RECORDS_IN_RANGE , ET_USING_SECONDARY_ENGINE , ET_REMATERIALIZE , ET_total
}
 Types of traditional "extra" column parts and property names for hierarchical. More...
 
enum  enum_mod_type {
  MT_NONE , MT_INSERT , MT_UPDATE , MT_DELETE ,
  MT_REPLACE
}
 
enum  Explain_sort_clause {
  ESC_none = 0 , ESC_ORDER_BY = 1 , ESC_GROUP_BY = 2 , ESC_DISTINCT = 3 ,
  ESC_BUFFER_RESULT = 4 , ESC_WINDOWING = 5 , ESC_MAX
}
 Enumeration of ORDER BY, GROUP BY and DISTINCT clauses for array indexing. More...
 
enum  Explain_sort_property {
  ESP_none = 0 , ESP_EXISTS = 1 << 0 , ESP_IS_SIMPLE = 1 << 1 , ESP_USING_FILESORT = 1 << 2 ,
  ESP_USING_TMPTABLE = 1 << 3 , ESP_DUPS_REMOVAL = 1 << 4
}
 Bit flags to explain GROUP BY, ORDER BY and DISTINCT clauses. More...
 

Detailed Description

EXPLAIN FORMAT=<format> <command>.

Enumeration Type Documentation

◆ enum_mod_type

Enumerator
MT_NONE 
MT_INSERT 
MT_UPDATE 
MT_DELETE 
MT_REPLACE 

◆ Explain_sort_clause

Enumeration of ORDER BY, GROUP BY and DISTINCT clauses for array indexing.

See Explain_format_flags::sorts

Enumerator
ESC_none 
ESC_ORDER_BY 
ESC_GROUP_BY 
ESC_DISTINCT 
ESC_BUFFER_RESULT 
ESC_WINDOWING 
ESC_MAX 

◆ Explain_sort_property

Bit flags to explain GROUP BY, ORDER BY and DISTINCT clauses.

Enumerator
ESP_none 
ESP_EXISTS 

Original query has this clause.

ESP_IS_SIMPLE 

Clause is effective for single JOIN_TAB only.

ESP_USING_FILESORT 

Clause causes a filesort.

ESP_USING_TMPTABLE 

Clause creates an intermediate table.

ESP_DUPS_REMOVAL 

Duplicate removal for DISTINCT.

◆ Extra_tag

enum Extra_tag

Types of traditional "extra" column parts and property names for hierarchical.

The traditional_extra_tags[] and json_extra_tags[] arrays must be in sync with this enum.

Enumerator
ET_none 
ET_USING_TEMPORARY 
ET_USING_FILESORT 
ET_USING_INDEX_CONDITION 
ET_USING 
ET_RANGE_CHECKED_FOR_EACH_RECORD 
ET_USING_PUSHED_CONDITION 
ET_USING_WHERE 
ET_NOT_EXISTS 
ET_USING_MRR 
ET_USING_INDEX 
ET_FULL_SCAN_ON_NULL_KEY 
ET_USING_INDEX_FOR_GROUP_BY 
ET_USING_INDEX_FOR_SKIP_SCAN 
ET_DISTINCT 
ET_LOOSESCAN 
ET_START_TEMPORARY 
ET_END_TEMPORARY 
ET_FIRST_MATCH 
ET_MATERIALIZE 
ET_START_MATERIALIZE 
ET_END_MATERIALIZE 
ET_SCAN 
ET_USING_JOIN_BUFFER 
ET_CONST_ROW_NOT_FOUND 
ET_UNIQUE_ROW_NOT_FOUND 
ET_IMPOSSIBLE_ON_CONDITION 
ET_PUSHED_JOIN 
ET_FT_HINTS 
ET_BACKWARD_SCAN 
ET_RECURSIVE 
ET_TABLE_FUNCTION 
ET_SKIP_RECORDS_IN_RANGE 
ET_USING_SECONDARY_ENGINE 
ET_REMATERIALIZE 
ET_total