[MDEV-20854] ANALYZE for statements: not clear where the time is spent Created: 2019-10-17 Updated: 2020-01-23 Resolved: 2019-11-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Fix Version/s: | 10.5.0 |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | analyze-stmt | ||
| Description |
|
ANALYZE FORMAT=JSON shows r_total_time_ms field which allows one to see where the time was spent during execution. r_total_time_ms is provided for
The issue is that for many-table join one can frequently see that
this leaves one puzzled re where the time is spent. |
| Comments |
| Comment by Sergei Petrunia [ 2019-11-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
"Gap time tracking" patch changes "table" element's r_total_time_ms into two:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2019-11-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
A complete example:
Here one can see: total select's time 215 ms, while the total time spent The same query after the patch:
It's clear that the time is spent in B's r_other_time_ms. (Ideally, the time could be shown in block-nl-join node). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2019-11-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pushed into bb-10.5-mdev20854 |