[MDEV-11107] Use table check constraints in optimizer Created: 2016-10-22 Updated: 2020-11-25 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Galina Shalygina (Inactive) | Assignee: | Igor Babaev |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Sprint: | 10.3.6-1, 10.4.0-1 |
| Description |
|
Consider two tables defined as
and a query
If to take into account the check constraint on t1.b then the query will be looking as
As t1.b is equal to t2.a a much better condition on the column t2.a can be deduced: Consider another query
As in the previous one, a new condition for t2.a can be deduced: t2.a > 10 and t2.a < 5 |