summaryrefslogtreecommitdiffstats
path: root/sql/sql_explain.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-01 18:15:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-01 18:15:00 +0000
commita2a2e32c02643a0cec111511220227703fda1cd5 (patch)
tree69cc2b631234c2a8e026b9cd4d72676c61c594df /sql/sql_explain.h
parentReleasing progress-linux version 1:10.11.8-1~progress7.99u1. (diff)
downloadmariadb-a2a2e32c02643a0cec111511220227703fda1cd5.tar.xz
mariadb-a2a2e32c02643a0cec111511220227703fda1cd5.zip
Merging upstream version 1:11.4.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sql/sql_explain.h')
-rw-r--r--sql/sql_explain.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/sql/sql_explain.h b/sql/sql_explain.h
index c71ba3a6..e7fe9b65 100644
--- a/sql/sql_explain.h
+++ b/sql/sql_explain.h
@@ -215,6 +215,7 @@ public:
message(NULL),
having(NULL), having_value(Item::COND_UNDEF),
using_temporary(false), using_filesort(false),
+ cost(0.0),
time_tracker(is_analyze),
aggr_tree(NULL)
{}
@@ -248,9 +249,10 @@ public:
bool using_temporary;
bool using_filesort;
+ double cost;
/* ANALYZE members */
Time_and_counter_tracker time_tracker;
-
+
/*
Part of query plan describing sorting, temp.table usage, and duplicate
removal
@@ -331,6 +333,7 @@ public:
/////////////////////////////////////////////////////////////////////////////
extern const char *unit_operation_text[4];
+extern const char *pushed_unit_operation_text[4];
extern const char *pushed_derived_text;
extern const char *pushed_select_text;
@@ -345,7 +348,7 @@ class Explain_union : public Explain_node
public:
Explain_union(MEM_ROOT *root, bool is_analyze) :
Explain_node(root), union_members(PSI_INSTRUMENT_MEM),
- is_recursive_cte(false),
+ is_recursive_cte(false), is_pushed_down_to_engine(false),
fake_select_lex_explain(root, is_analyze)
{}
@@ -376,13 +379,18 @@ public:
}
int print_explain(Explain_query *query, select_result_sink *output,
uint8 explain_flags, bool is_analyze);
- void print_explain_json(Explain_query *query, Json_writer *writer,
+ void print_explain_json(Explain_query *query, Json_writer *writer,
bool is_analyze);
+ void print_explain_json_regular(Explain_query *query, Json_writer *writer,
+ bool is_analyze);
+ void print_explain_json_pushed_down(Explain_query *query,
+ Json_writer *writer, bool is_analyze);
const char *fake_select_type;
bool using_filesort;
bool using_tmp;
bool is_recursive_cte;
+ bool is_pushed_down_to_engine;
/*
Explain data structure for "fake_select_lex" (i.e. for the degenerate
@@ -401,6 +409,10 @@ public:
}
private:
uint make_union_table_name(char *buf);
+ int print_explain_regular(Explain_query *query, select_result_sink *output,
+ uint8 explain_flags, bool is_analyze);
+ int print_explain_pushed_down(select_result_sink *output,
+ uint8 explain_flags, bool is_analyze);
Table_access_tracker fake_select_lex_tracker;
/* This one is for reading after ORDER BY */
@@ -752,6 +764,8 @@ public:
Explain_table_access(MEM_ROOT *root, bool timed) :
derived_select_number(0),
non_merged_sjm_number(0),
+ cost(0.0),
+ loops(0.0),
extra_tags(root),
range_checked_fer(NULL),
full_scan_on_null_key(false),
@@ -821,6 +835,10 @@ public:
ha_rows rows;
double filtered;
+ /* Total cost incurred during one execution of this select */
+ double cost;
+
+ double loops;
/*
Contents of the 'Extra' column. Some are converted into strings, some have
parameters, values for which are stored below.