[DOCS-7830] Comment on: "manual/core/aggregation-pipeline-optimization.txt" Created: 08/May/16  Updated: 03/Nov/17  Resolved: 08/May/16

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Unassigned
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: https://docs.mongodb.com/manual/core/aggregation-pipeline-optimization/
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Referrer: https://docs.mongodb.com/manual/core/aggregation-pipeline/
Screen Resolution: 1366 x 768


Participants:
Days since reply: 7 years, 40 weeks, 3 days ago

 Description   

on $limit + $skip + $limit + $skip Sequence
i think $limit should 10 not 100



 Comments   
Comment by Kay Kim (Inactive) [ 08/May/16 ]

The sequence has two different limits (both 100 and 10)

{ $limit: 100 },
{ $skip: 5 },
{ $limit: 10 },
{ $skip: 2 }

Aggregation sequence optimization can switch the order of {$skip: 5} and {$limit: 10} and increases {$limit: 10} by 5 (the amount of the skip amount) to become:

{ $limit: 100 },
{ $limit: 15 },
{ $skip: 5 },
{ $skip: 2 }

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