[DOCS-12340] Clarification on the usage of limit() and skip() used together in a sharded cluster Created: 08/Jan/19  Updated: 30/Oct/23

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Major - P3
Reporter: Daniel Coupal Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: docs-query, docs-sharding, limit, mongos, sharding, skip
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:
Days since reply: 1 year, 14 weeks, 2 days ago
Epic Link: DOCSP-1769
Story Points: 0.1

 Description   

Description

In the following page: https://docs.mongodb.com/manual/core/sharded-cluster-query-router/ ,
we describe the interaction of limit() and skip() as

When used in conjunction with a limit(), the mongos will pass the limit plus the value of the skip() to the shards to improve the efficiency of these operations.

It is correct, however it could be misinterpreted as the skip() being run on each shard.

The following may be more precise.

When used in conjunction with a limit(), the mongos will pass
the limit plus the value of the skip() to the shards as the number
of document to limit to, without applying any skip.
The mongos will then have the appropriate documents to
apply the final limit() and skip() correctly.

 



 Comments   
Comment by Education Bot [ 31/Oct/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

Generated at Thu Feb 08 08:05:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.