[MDEV-30972] ANALYZE FORMAT=JSON: some time is unaccounted-for in BNL-H joins Created: 2023-03-30 Updated: 2023-04-04 Resolved: 2023-04-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.6 |
| Fix Version/s: | 11.1.0, 10.11.3, 11.0.2, 10.6.13, 10.7.8, 10.8.8, 10.9.6, 10.10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Consider this testcase:
Produces
In more detail:
note that times do not add up to query_block.r_total_time_ms. |
| Comments |
| Comment by Sergei Petrunia [ 2023-03-31 ] | |||||||||||||||||||||||
|
Indeed, this is because the counter counting "r_unpack_time_ms" doesn't have a "Gap counter" attached to it. If we add a Gap Counter to it, we can print its value into block-nl-join.r_other_time_ms. | |||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2023-03-31 ] | |||||||||||||||||||||||
|
With the patch, I get:
Note the block-nl-join.r_other_time_ms: 659.1228799. With that member, the numbers add up again. | |||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2023-03-31 ] | |||||||||||||||||||||||
|
https://github.com/MariaDB/server/commit/b2cc6a3432db69ca6d7ab0360ad48bb5e6dd20fd | |||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2023-04-04 ] | |||||||||||||||||||||||
|
Got Ok to push from Monty. |