[MDEV-21895] Refactor handler::records_in_range() Created: 2020-03-09 Updated: 2023-11-30 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Optimizer, Storage Engine - InnoDB |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Critical |
| Reporter: | Marko Mäkelä | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | performance, records_in_range, statistics | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
According to igor, the entire function handler::records_in_range() should be replaced with something that returns the position of a key, as a floating-point number between 0 (start of index) and 1 (end of index). Perhaps we could take a collection of keys as a parameter, so that we can minimize the amount of operations on index or page latches? |
| Comments |
| Comment by Vladislav Lesin [ 2022-12-20 ] |
|
As btr_estimate_n_rows_in_range_low() was rewritten, there is nothing to do from InnoDB side until some requirements to the engine are formulated. I reassign it to igor, as he was mentioned in the description as the person who can formulate it. |
| Comment by Sergei Golubchik [ 2023-08-16 ] |
|
We aren't changing record_in_range() API right now. Is there anything else that needs to be done within the scope in this task inside InnoDB? Or shall it be closed? |
| Comment by Marko Mäkelä [ 2023-08-17 ] |
|
I do not see the point of closing tickets just because they are old. An API that could process several keys at once would allow more efficient traversal of the index tree, with fewer buf_pool.page_hash lookups and lock/unlock operations. That said, MDEV-19424 might be more important in the near future. |
| Comment by Sergei Golubchik [ 2023-08-17 ] |
|
rephrased the description to be not InnoDB-specific |