diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2019-11-09 21:03:23 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2019-11-12 14:38:31 +0300 |
commit | 1ced761e6da4cc61207d7584e25aa18e3505d36e (patch) | |
tree | 310bfbc9548799bf0d4a0a5dc06762e0fe349473 /sql/sql_update.cc | |
parent | bce71a2909a8add9d0ca848bb387bacfd6e588e9 (diff) | |
download | mariadb-git-1ced761e6da4cc61207d7584e25aa18e3505d36e.tar.gz |
MDEV-20854: ANALYZE for statements: not clear where the time is spentbb-10.5-mdev20854
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_update.cc')
-rw-r--r-- | sql/sql_update.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 9f298a51b72..26dfe5e40a2 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -666,7 +666,7 @@ int mysql_update(THD *thd, if (!(explain= query_plan.save_explain_update_data(query_plan.mem_root, thd))) goto err; - ANALYZE_START_TRACKING(&explain->command_tracker); + ANALYZE_START_TRACKING(thd, &explain->command_tracker); DBUG_EXECUTE_IF("show_explain_probe_update_exec_start", dbug_serve_apcs(thd, 1);); @@ -1168,7 +1168,7 @@ update_begin: break; } } - ANALYZE_STOP_TRACKING(&explain->command_tracker); + ANALYZE_STOP_TRACKING(thd, &explain->command_tracker); table->auto_increment_field_not_null= FALSE; dup_key_found= 0; /* |