[SERVER-44773] Optimise queries to cover on sharded clusters when using compound hashed index Created: 21/Nov/19 Updated: 29/Oct/23 Resolved: 22/Jan/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.3 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Arun Banala | Assignee: | Arun Banala |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Query 2020-01-13, Query 2020-01-27 |
| Participants: |
| Description |
|
When compound hashed shard key has a range prefix, if the query predicate is on the prefix and the projection doesn't include hashed fields then the query can be covered. The current behaviour for hashed shard keys is, we always fetch the documents on the shards to make sure that the document is not an orphan. When the projection and query doesn't include hashed fields, the document fetch can be avoided. |
| Comments |
| Comment by Githook User [ 22/Jan/20 ] |
|
Author: {'username': 'banarun', 'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com'}Message: create mode 100644 jstests/sharding/compound_hashed_shard_key_covered_query.js |
| Comment by David Storch [ 22/Nov/19 ] |
|
arun.banala can you provide a description for this ticket? Thanks! |