[SERVER-70477] Optimizing expressions that are tautologically constant (e.g., `True` or `False`) Created: 11/Oct/22 Updated: 24/Nov/23 Resolved: 16/Nov/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.3.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Mohammad Dashti (Inactive) | Assignee: | Carlos Alonso Pérez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | QO 2023-10-16, QO 2023-10-30, QO 2023-11-13, QO 2023-11-27 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 120 | ||||||||||||
| Description |
|
Irina suggested in this comment that {$in: []} is tautologically "false" so it would be nice to optimize the plan to "return an empty result right away" rather than scanning anything. |
| Comments |
| Comment by Githook User [ 16/Nov/23 ] |
|
Author: {'name': 'Carlos Alonso', 'email': 'c.alonso@mongodb.com', 'username': 'calonso'}Message: |