summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2019-11-09 21:03:23 +0300
committerSergei Petrunia <psergey@askmonty.org>2019-11-12 14:40:00 +0300
commit68ed3a81f2113ecdcd5fce0f0cab636d57ff77da (patch)
tree6a1ec5f927a864018475f908c005b314b1feaacf /sql/sql_delete.cc
parent0117d0e65ac8051bc9f6d14764a2ab05e69bd895 (diff)
downloadmariadb-git-68ed3a81f2113ecdcd5fce0f0cab636d57ff77da.tar.gz
MDEV-20854: ANALYZE for statements: not clear where the time is spent
Count the "gap" time between table accesses and display it as r_other_time_ms in the "table" element. * The advantage of this approach is that it doesn't add any new my_timer_cycles() calls. * The disadvantage is that the definition of what is done during "other time" is not that clear: it includes checking the WHERE (for this table), constructing index lookup tuple (for the next table) writing to GROUP BY temporary table (as we dont account for that time separately [yet], etc)
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 0ea00a7d61c..b12312041bd 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -600,7 +600,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
if (!(explain= query_plan.save_explain_delete_data(thd->mem_root, thd)))
goto got_error;
- ANALYZE_START_TRACKING(&explain->command_tracker);
+ ANALYZE_START_TRACKING(thd, &explain->command_tracker);
DBUG_EXECUTE_IF("show_explain_probe_delete_exec_start",
dbug_serve_apcs(thd, 1););
@@ -878,7 +878,7 @@ terminate_delete:
table->file->ha_release_auto_increment();
if (options & OPTION_QUICK)
(void) table->file->extra(HA_EXTRA_NORMAL);
- ANALYZE_STOP_TRACKING(&explain->command_tracker);
+ ANALYZE_STOP_TRACKING(thd, &explain->command_tracker);
cleanup:
/*