[MDEV-4729] Combined ref and range access Created: 2013-06-28 Updated: 2015-10-30 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Sergei Petrunia | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 6 |
| Labels: | optimizer | ||
| Description |
|
Currently, MariaDB (and MySQL) optimizer support:
This causes sub-optimal plans for queries like
If the join order is t1, t2, table t2 can only be accessed using "t2.key1part1=t1.col". Or, one can have a separate index on t2.key1part2 and use the second part of WHERE. Both parts cannot be used. There are optimizations that help handle these cases
but they do not achieve top performance. This task is about allowing to combine ref access with range. It is difficult to do in general, however, we can easily handle trivial cases like
In MariaDB 10.0, there is index statistics, so we will be able to get selectivity numbers for range_condition(t.keypartK+1, ...) |
| Comments |
| Comment by VAROQUI Stephane [ 2013-06-28 ] |
|
Describing client case where it can be used |