[MDEV-30485] ANALYZE FORMAT=JSON: Show r_table_loops Created: 2023-01-27 Updated: 2023-10-30 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Fix Version/s: | 11.5 |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Oleg Smirnov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | analyze-stmt | ||
| Description |
|
ANALYZE FORMAT=JSON shows r_loops. This is the number of times the control was passed to this table. However, this is not always equal to the number of times the table access method was invoked. Reasons:
This is already done for eq_ref in 11.0, but not for other access methods. |
| Comments |
| Comment by Sergei Petrunia [ 2023-01-27 ] | |||||||||||||||||||||
|
Implementation for eq_ref:
| |||||||||||||||||||||
| Comment by Sergei Petrunia [ 2023-01-27 ] | |||||||||||||||||||||
|
tracker counts number of times we've entered sub_select. op_tracker counts how many times we did a read operation from the table. Since eq_ref access only does one read per each scan, this counter is good for counting lookups. As for access methods that might read multiple rows, it seems we cannot produce this with current counters.
| |||||||||||||||||||||
| Comment by Sergei Petrunia [ 2023-03-06 ] | |||||||||||||||||||||
|
The following is in 11.0. It adds r_table_loops but ONLY for eq_ref access. (We don't need any extra counters in that case):
|