[SERVER-1007] rewrite $in queries on shard key to only include keys on each shard Created: 12/Apr/10  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Mathias Stearn Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 12
Labels: graphquery, qopt-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-3163 mongoS should split $in queries to sh... Closed
is duplicated by SERVER-9332 Mongos should re-write $in queries on... Closed
is duplicated by SERVER-37279 suboptimal read isolation when using ... Closed
is duplicated by SERVER-50299 Shard Targeting for $in statements Closed
Related
Assigned Teams:
Query Optimization
Participants:
Case:

 Comments   
Comment by Roman Skvazh [ 16/Jan/15 ]

asya, yes, we already do this the same way and it helps a lot. Thx.

Comment by Asya Kamsky [ 15/Jan/15 ]

rskvazh if you send mongos a bulk update each with single shard key, it will distribute them to appropriate shards (maybe sure that you specify

{ordered:false}

so it can send them in parallel).

However, whether that will be faster to complete than a single update sent to all shards depends on your specific data distribution and workloads. I would recommend testing it out.

Comment by Roman Skvazh [ 13/Nov/14 ]

What about this ticket? Should we use Bulk operations for writes as a workaround?

Generated at Thu Feb 08 02:55:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.