1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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)
This commit is contained in:
Sergei Petrunia
2019-11-09 21:03:23 +03:00
parent 0117d0e65a
commit 68ed3a81f2
27 changed files with 448 additions and 206 deletions

View File

@ -977,7 +977,8 @@ ANALYZE
"r_loops": 1,
"rows": 101,
"r_rows": 100,
"r_total_time_ms": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"using_index_for_group_by": true
@ -1292,7 +1293,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"r_total_time_ms": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@ -1346,7 +1348,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"r_total_time_ms": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@ -1361,7 +1364,8 @@ ANALYZE
"r_loops": 2,
"rows": 1,
"r_rows": 1,
"r_total_time_ms": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "trigcond(t2.pk is null) and trigcond(trigcond(t1.a is not null))",
@ -1421,7 +1425,8 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"r_total_time_ms": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "t1.a is not null"
@ -1437,7 +1442,8 @@ ANALYZE
"r_loops": 2,
"rows": 1,
"r_rows": 1,
"r_total_time_ms": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"using_index": true,
@ -1512,7 +1518,8 @@ ANALYZE
"r_loops": 1,
"rows": 10,
"r_rows": 10,
"r_total_time_ms": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"attached_condition": "t3.a is not null"
@ -1529,7 +1536,8 @@ ANALYZE
"r_loops": 1,
"rows": 1,
"r_rows": 10,
"r_total_time_ms": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100,
"index_condition_bka": "t4.b + 1 <= t3.b + 1"