[SERVER-82814] Support internal expr comparison operators when determining clustered collection scan bounds Created: 06/Nov/23 Updated: 14/Dec/23 Resolved: 11/Dec/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: | Ivan Fefer | Assignee: | James Harrison |
| 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-12-11 | ||||
| Participants: | |||||
| Description |
|
Currently, query on clustered collection will not use the index
However, same syntax with a secondary index will work. Because of slight semantic difference between match $gt and aggregation $gt When computing bounds for secondary index scan, $_internalExpr* operators are supported, however, they are not supported in clustered collection scan bounds: There might be a reason for it, because of semantic difference, so we need to either fix it by adding internal expr comparison operations to the code, linked about, or add a comment about why we can't do it. |
| Comments |
| Comment by Githook User [ 14/Dec/23 ] |
|
Author: {'name': 'James Harrison', 'email': '00jamesh@gmail.com', 'username': 'jameseh96'}Message: Behaviour changed in GitOrigin-RevId: 26e5fb7e890b6477fa823934e799841da0eecc40 |
| Comment by Githook User [ 08/Dec/23 ] |
|
Author: {'name': 'James Harrison', 'email': '00jamesh@gmail.com', 'username': 'jameseh96'}Message: GitOrigin-RevId: 4a27d87f0d424af3a246befbac191cea9922085a |
| Comment by Githook User [ 08/Dec/23 ] |
|
Author: {'name': 'James Harrison', 'email': '00jamesh@gmail.com', 'username': 'jameseh96'}Message: INTERNAL_EXPR_* variants of {EQ, LT, LTE, GT, GTE} are less "precise" When scanning records in a clustered index scan, these variants may GitOrigin-RevId: 0884ff92a78d2b8dcaff307cf8fdd9da6af082da |
| Comment by John Page [ 01/Dec/23 ] |
|
We are starting to encourage users to use clustered collections where appropriate and seeing significant performance benefits from them - we absolutely need this to work OR to make $lookup not require us to use $expr syntax (I'd prefer the latter) |
| Comment by Chris Hutchinson [ 17/Nov/23 ] |
|
ivan.fefer@mongodb.com - please could you clarify the motivation and summarize the linked tickets? |