Hi,
@DHz
db.coll.aggregate([{$skip:10}, {$limit: 5}])
< Option 1
db.coll.aggregate([{$limit: 15}, {$skip: 10}])
< Option 2
How’s the second more efficient than the first if,
result is a 100 records, and the 1’st stage skips 10 so it’s left with 90 and then limits it to 5
second stage it limits to 15 but from the 100 records obtained and then skips 10 from the 15.
So exactly how is the efficiency achieved by changing stages in the second option?
Thanks.