[MDEV-24711] Make "unique_key NOT IN (...)" conditions non-sargable Created: 2021-01-27 Updated: 2023-09-20 Resolved: 2021-01-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.2 |
| Fix Version/s: | 10.4.18, 10.5.9, 10.6.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
This is a part of This MDEV covers "(Very basic) Make NOT-IN non-sargable" suggestion from here: The idea is to make conditions in form "unique_key NOT IN (const, .... )" non-sargable. The reasoning is: when the constant list is small, the condition is not selective. when the constant list is large (half the table or more), the overhead of processing the list by the optimizer is too high. The fix was pushed as these three patches:
The fixes were pushed into 10.4, 10.5, and 10.6 trees. |