[MDEV-21852] ANALYZE for statements: r_other_time_ms inside filesort Created: 2020-03-02 Updated: 2020-06-09 Resolved: 2020-06-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.5 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Petrunia |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
r_other_time_ms was introduced to collect the time spent in JOIN "between the table accesses" - checking the WHERE, etc. However it is also printed for tables that are put as a source to filesort:
Does it have any meaning there? Need to check this. |
| Comments |
| Comment by Sergei Petrunia [ 2020-06-04 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Looking at the numbers in the report
note that filesort's time is less than table's time. This is surprising as | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2020-06-04 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
... and I can't reproduce this now. In my example, filesort's r_total_time_ms
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2020-06-04 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Back to the initial question. When/if we start to count the time spent sorting the buffer (in write_keys) and doing the merge-sort operation, then r_other_time_ms will get a more "conventional" meaning of "checking the WHERE, etc". It will still likely include the time spent constructing the sort keys, because it's not feasible to count that separately. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2020-06-04 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
For now, closing as not-a-bug. |