[SERVER-46168] Sort without predicate on non-hashed prefix fields does not use compound hashed index Created: 14/Feb/20 Updated: 29/Oct/23 Resolved: 18/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc0, 4.7.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Arun Banala | Assignee: | Arun Banala |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | qexec-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Backport Requested: |
v4.4
|
||||
| Sprint: | Query 2020-03-23 | ||||
| Participants: | |||||
| Description |
|
If there is no query predicate, we use a different code path to do just sorting. This should also be updated to allow compound hashed indexes for sorting. |
| Comments |
| Comment by Githook User [ 24/Mar/20 ] |
|
Author: {'email': 'arun.banala@mongodb.com', 'name': 'Arun Banala', 'username': 'banarun'}Message: (cherry picked from commit 9606514ab0a77fbe14eb9a3f607d193a50971634) |
| Comment by Githook User [ 16/Mar/20 ] |
|
Author: {'username': 'banarun', 'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com'}Message: |
| Comment by Craig Homa [ 18/Feb/20 ] |
|
We also want to backport this to 4.4. |
| Comment by Craig Homa [ 18/Feb/20 ] |
|
Steps to reproduce from when this was a bug: db.c.createIndex( {a: 1, b: 'hashed'}) { "createdCollectionAutomatically" : false, "numIndexesBefore" : 1, "numIndexesAfter" : 2, "commitQuorum" : 1, "ok" : 1 }> db.c.find().sort( {a: 1}).explain() }, , }, , |