summaryrefslogtreecommitdiff
path: root/sql/sql_explain.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2023-04-14 11:32:36 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2023-04-14 11:32:36 +0300
commit44281b88f3ce04e85ba49ba1f557f6cca328a4e7 (patch)
tree4daba52cd11f3b52e96af3e0887eee7bc7d4e034 /sql/sql_explain.h
parent55e78ebf4136ed7bf78b45963f53e503201a59bb (diff)
parent10147af9e5b25739bada32c6eb4f204d5f2985a1 (diff)
downloadmariadb-git-44281b88f3ce04e85ba49ba1f557f6cca328a4e7.tar.gz
Merge 10.8 into 10.9
Diffstat (limited to 'sql/sql_explain.h')
-rw-r--r--sql/sql_explain.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/sql/sql_explain.h b/sql/sql_explain.h
index 0e8569aabe5..a0f137bb561 100644
--- a/sql/sql_explain.h
+++ b/sql/sql_explain.h
@@ -493,7 +493,7 @@ public:
bool is_analyze);
/* Send tabular EXPLAIN to the client */
- int send_explain(THD *thd);
+ int send_explain(THD *thd, bool extended);
/* Return tabular EXPLAIN output as a text string */
bool print_explain_str(THD *thd, String *out_str, bool is_analyze);
@@ -747,7 +747,7 @@ public:
class Explain_table_access : public Sql_alloc
{
public:
- Explain_table_access(MEM_ROOT *root) :
+ Explain_table_access(MEM_ROOT *root, bool timed) :
derived_select_number(0),
non_merged_sjm_number(0),
extra_tags(root),
@@ -760,6 +760,7 @@ public:
pushed_index_cond(NULL),
sjm_nest(NULL),
pre_join_sort(NULL),
+ jbuf_unpack_tracker(timed),
rowid_filter(NULL)
{}
~Explain_table_access() { delete sjm_nest; }
@@ -867,8 +868,22 @@ public:
Exec_time_tracker op_tracker;
Gap_time_tracker extra_time_tracker;
+ /* When using join buffer: Track the reads from join buffer */
Table_access_tracker jbuf_tracker;
-
+
+ /* When using join buffer: time spent unpacking rows from the join buffer */
+ Time_and_counter_tracker jbuf_unpack_tracker;
+
+ /*
+ When using join buffer: time spent after unpacking rows from the join
+ buffer. This will capture the time spent checking the Join Condition:
+ the condition that depends on this table and preceding tables.
+ */
+ Gap_time_tracker jbuf_extra_time_tracker;
+
+ /* When using join buffer: Track the number of incoming record combinations */
+ Counter_tracker jbuf_loops_tracker;
+
Explain_rowid_filter *rowid_filter;
int print_explain(select_result_sink *output, uint8 explain_flags,