MySQL 8.4.3
Source Code Documentation
|
#include "sql/opt_explain_json.h"
#include <assert.h>
#include <sys/types.h>
#include <climits>
#include <cstddef>
#include <cstdio>
#include "my_alloc.h"
#include "my_compiler.h"
#include "mysql/strings/m_ctype.h"
#include "sql-common/json_dom.h"
#include "sql/current_thd.h"
#include "sql/enum_query_type.h"
#include "sql/item.h"
#include "sql/item_sum.h"
#include "sql/key_spec.h"
#include "sql/mysqld.h"
#include "sql/opt_trace.h"
#include "sql/opt_trace_context.h"
#include "sql/protocol.h"
#include "sql/query_result.h"
#include "sql/sql_class.h"
#include "sql/sql_list.h"
#include "sql/system_variables.h"
#include "sql/table.h"
#include "sql/temp_table_param.h"
#include "sql/window.h"
#include "sql_string.h"
#include "string_with_len.h"
Classes | |
class | opt_explain_json_namespace::context |
Base class for all intermediate tree nodes. More... | |
class | opt_explain_json_namespace::subquery_ctx |
Node class to wrap a subquery node tree. More... | |
class | opt_explain_json_namespace::unit_ctx |
Helper base class to host HAVING, ORDER BY and GROUP BY subquery nodes. More... | |
class | opt_explain_json_namespace::table_base_ctx |
class | opt_explain_json_namespace::setop_result_ctx |
Node class for the CTX_UNION_RESULT. More... | |
class | opt_explain_json_namespace::table_with_where_and_derived |
Common part of CTX_QEP_TAB and CTX_MESSAGE nodes. More... | |
class | opt_explain_json_namespace::joinable_ctx |
Base for CTX_QEP_TAB, CTX_DUPLICATES_WEEDOUT and CTX_MATERIALIZATION nodes. More... | |
class | opt_explain_json_namespace::message_ctx |
Node class for CTX_MESSAGE. More... | |
class | opt_explain_json_namespace::join_tab_ctx |
Node class for the CTX_QEP_TAB context. More... | |
class | opt_explain_json_namespace::simple_sort_ctx |
Base class for CTX_ORDER_BY, CTX_GROUP_BY and node class for CTX_DISTINCT. More... | |
class | opt_explain_json_namespace::simple_sort_with_subqueries_ctx |
Node class for "simple" CTX_ORDER_BY and CTX_GROUP_BY. More... | |
class | opt_explain_json_namespace::join_ctx |
Node class for the CTX_JOIN context. More... | |
class | opt_explain_json_namespace::sort_ctx |
Node class for CTX_SIMPLE_ORDER_BY, CTX_SIMPLE_GROUP_BY and CTX_SIMPLE_DISTINCT. More... | |
class | opt_explain_json_namespace::sort_with_subqueries_ctx |
class | opt_explain_json_namespace::window_ctx |
When the query has window functions, an outer node named "windowing" is added: query_block: { select_id: 1, windowing: { windows: [ ... list of all windows' details ... ], nested_loop: [ ... ]. More... | |
class | opt_explain_json_namespace::materialize_ctx |
Context class to group materialized JOIN_TABs to "materialized" array. More... | |
class | opt_explain_json_namespace::duplication_weedout_ctx |
Context class to represent JOIN_TABs in duplication weedout sequence. More... | |
class | opt_explain_json_namespace::setop_ctx |
Node class for UNION, EXCEPT, INTERSECT, UNARY (query expression) More... | |
Namespaces | |
namespace | opt_explain_json_namespace |
Functions | |
static bool | opt_explain_json_namespace::format_list (Opt_trace_context *json, List< subquery_ctx > &subqueries, const char *name) |
Helper function to pass a subquery list to a JSON formatter. More... | |
static void | opt_explain_json_namespace::add_string_array (Opt_trace_context *json, const char *list_name, List< const char > &strings) |
static void | opt_explain_json_namespace::print_cost (char *buf, uint buf_len, double cost) |
static void | opt_explain_json_namespace::print_filtered (char *buf, uint buf_len, double filtered) |
template<typename T > | |
static size_t | opt_explain_json_namespace::get_id (List< T > &list, bool hide) |
Auxiliary function to walk through the list and propagate "hide" value. More... | |
Variables | |
static const char * | json_extra_tags [ET_total] |
Property names, former parts of traditional "extra" column. More... | |
static const char | K_ACCESS_TYPE [] = "access_type" |
static const char | K_ATTACHED_CONDITION [] = "attached_condition" |
static const char | K_ATTACHED_SUBQUERIES [] = "attached_subqueries" |
static const char | K_BUFFER_RESULT [] = "buffer_result" |
static const char | K_CACHEABLE [] = "cacheable" |
static const char | K_DEPENDENT [] = "dependent" |
static const char | K_DUPLICATES_REMOVAL [] = "duplicates_removal" |
static const char | K_FILTERED [] = "filtered" |
static const char | K_FRAME_BUFFER [] = "frame_buffer" |
static const char | K_FUNCTIONS [] = "functions" |
static const char | K_GROUPING_OPERATION [] = "grouping_operation" |
static const char | K_GROUP_BY_SUBQUERIES [] = "group_by_subqueries" |
static const char | K_HAVING_SUBQUERIES [] = "having_subqueries" |
static const char | K_INSERT_VALUES_SUBQUERIES [] = "insert_values_subqueries" |
static const char | K_INSERT_UPDATE_SUBQUERIES [] = "insert_update_subqueries" |
static const char | K_KEY [] = "key" |
static const char | K_KEY_LENGTH [] = "key_length" |
static const char | K_MATERIALIZED_FROM_SUBQUERY [] = "materialized_from_subquery" |
static const char | K_MESSAGE [] = "message" |
static const char | K_NAME [] = "name" |
static const char | K_NESTED_LOOP [] = "nested_loop" |
static const char | K_OPTIMIZED_AWAY_SUBQUERIES [] = "optimized_away_subqueries" |
static const char | K_OPTIMIZED_FRAME_EVALUATION [] = "optimized_frame_evaluation" |
static const char | K_ORDERING_OPERATION [] = "ordering_operation" |
static const char | K_ORDER_BY_SUBQUERIES [] = "order_by_subqueries" |
static const char | K_PARTITIONS [] = "partitions" |
static const char | K_POSSIBLE_KEYS [] = "possible_keys" |
static const char | K_QUERY_BLOCK [] = "query_block" |
static const char | K_QUERY_SPECIFICATIONS [] = "query_specifications" |
static const char | K_REF [] = "ref" |
static const char | K_SELECT_ID [] = "select_id" |
static const char | K_SELECT_LIST_SUBQUERIES [] = "select_list_subqueries" |
static const char | K_SHARING_TMP_TABLE [] = "sharing_temporary_table_with" |
static const char | K_TABLE [] = "table" |
static const char | K_TABLE_NAME [] = "table_name" |
static const char | K_UNION_RESULT [] = "union_result" |
static const char | K_INTERSECT_RESULT [] = "intersect_result" |
static const char | K_EXCEPT_RESULT [] = "except_result" |
static const char | K_UNARY_RESULT [] = "unary_result" |
static const char | K_UPDATE_VALUE_SUBQUERIES [] = "update_value_subqueries" |
static const char | K_USED_KEY_PARTS [] = "used_key_parts" |
static const char | K_USING_FILESORT [] = "using_filesort" |
static const char | K_FILESORT_KEY [] = "filesort_key" |
static const char | K_USING_TMP_TABLE [] = "using_temporary_table" |
static const char | K_WINDOW_DEF_POS [] = "definition_position" |
static const char | K_WINDOW_LAST_EXECUTED [] = "last_executed_window" |
static const char | K_WINDOWS [] = "windows" |
static const char | K_WINDOWING [] = "windowing" |
static const char | K_ROWS [] = "rows_examined_per_scan" |
static const char | K_PREFIX_ROWS [] = "rows_produced_per_join" |
static const char | K_COST_INFO [] = "cost_info" |
static const char | K_READ_TIME [] = "read_cost" |
static const char | K_PREFIX_COST [] = "prefix_cost" |
static const char | K_COND_COST [] = "eval_cost" |
static const char | K_SORT_COST [] = "sort_cost" |
static const char | K_QUERY_COST [] = "query_cost" |
static const char | K_DATA_SIZE_QUERY [] = "data_read_per_join" |
static const char | K_USED_COLUMNS [] = "used_columns" |
static const char * | mod_type_name [] |
static const char * | opt_explain_json_namespace::list_names [SQ_total] |
|
static |
Property names, former parts of traditional "extra" column.
This array must be in sync with Extra_tag enum.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |