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:40:00 +0300 |
commit | 68ed3a81f2113ecdcd5fce0f0cab636d57ff77da (patch) | |
tree | 6a1ec5f927a864018475f908c005b314b1feaacf /sql/filesort.cc | |
parent | 0117d0e65ac8051bc9f6d14764a2ab05e69bd895 (diff) | |
download | mariadb-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/filesort.cc')
-rw-r--r-- | sql/filesort.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc index 3f4291cfb1f..bd6ac9d7374 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -196,7 +196,7 @@ SORT_INFO *filesort(THD *thd, TABLE *table, Filesort *filesort, else thd->inc_status_sort_scan(); thd->query_plan_flags|= QPLAN_FILESORT; - tracker->report_use(max_rows); + tracker->report_use(thd, max_rows); // If number of rows is not known, use as much of sort buffer as possible. num_rows= table->file->estimate_rows_upper_bound(); @@ -364,7 +364,7 @@ SORT_INFO *filesort(THD *thd, TABLE *table, Filesort *filesort, outfile->end_of_file=save_pos; } } - tracker->report_merge_passes_at_end(thd->query_plan_fsort_passes); + tracker->report_merge_passes_at_end(thd, thd->query_plan_fsort_passes); if (unlikely(error)) { int kill_errno= thd->killed_errno(); |