summaryrefslogtreecommitdiff
path: root/sql/sql_explain.h
diff options
context:
space:
mode:
authorSergei Petrunia <sergey@mariadb.com>2022-11-19 21:00:23 +0300
committerSergei Petrunia <sergey@mariadb.com>2023-02-03 11:01:24 +0300
commitffe0beca2557a31758f50fa53ceb9948b6cd6248 (patch)
treec1ed3bb3a4190a2fc0a331dee0bd428cea564a30 /sql/sql_explain.h
parent657868f5e726e0a5e78d879e4ae50f1d3b5a8d71 (diff)
downloadmariadb-git-ffe0beca2557a31758f50fa53ceb9948b6cd6248.tar.gz
MDEV-30032: EXPLAIN FORMAT=JSON output: print costs
Basic printout for join and table execution costs.
Diffstat (limited to 'sql/sql_explain.h')
-rw-r--r--sql/sql_explain.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_explain.h b/sql/sql_explain.h
index 42a1c360e5b..9e560c0be23 100644
--- a/sql/sql_explain.h
+++ b/sql/sql_explain.h
@@ -216,6 +216,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)
{}
@@ -249,9 +250,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
@@ -824,6 +826,9 @@ public:
ha_rows rows;
double filtered;
+ /* Total cost incurred during one execution of this select */
+ double cost;
+
/*
Contents of the 'Extra' column. Some are converted into strings, some have
parameters, values for which are stored below.