[MDEV-27287] Range optimizer creates too wide range for kp1>=const AND kp2... Created: 2021-12-16 Updated: 2021-12-21 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 5.5, 10.2, 10.8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
(The idea of this was given by igor, for descending indexes. Then, I modified the example so it applies to ascending indexes) Range optimizer creates a range that's wider than necessary for conditions in this and similar forms:
The range is:
while one could use a narrower collection o franges:
A testcase:
Note key_len=4, it uses one key part Optimizer trace confirms this:
|