[SERVER-69895] [CQF] Support reverse collscan: hint: {$natural: -1} Created: 22/Sep/22  Updated: 29/Oct/23  Resolved: 23/Jan/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Hana Pearlman Assignee: Hana Pearlman
Resolution: Fixed Votes: 0
Labels: cascades-starter, hint
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-62504 Add plumbing to the ABT for reverse c... Closed
Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Sprint: QO 2023-02-06
Participants:

 Description   

We currently permit {$natural: 1} hints, but uassert on {$natural: -1} hints. Instead of uasserting, we should support both hints.



 Comments   
Comment by Githook User [ 23/Jan/23 ]

Author:

{'name': 'Hana Pearlman', 'email': 'hana.pearlman@mongodb.com', 'username': 'HanaPearlman'}

Message: SERVER-69895: Support hinting reverse collection scans
Branch: master
https://github.com/mongodb/mongo/commit/e7643a84006dddaf997e1a50914afaf54f32abfd

Comment by David Percy [ 20/Dec/22 ]

It looks like currently Bonsai interprets {$natural: 1} to mean "don't use indexes". To support {$natural: -1} we need to add something like "sort by record ID descending". I wonder if we should also be more explicit that {$natural: 1} means "sort by record ID ascending".

Generated at Thu Feb 08 06:14:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.