Page through results with skip and limit.
Section: Projection, sort, and page
Offset pagination
javascript
javascript
db.orders.find().sort({ created_at: -1 }).skip(40).limit(20)Explanation
Offset pagination is easy to understand but can become less efficient for very large offsets.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Projection, sort, and page