Suggest an editImprove this articleRefine the answer for “What does limit() do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)`limit()` restricts the number of documents a query returns: for example, `db.users.find().limit(5)` returns only 5 documents, even if the collection has thousands. **Key point:** it's used to avoid pulling too much data at once, speed up the query, and make pagination convenient.Shown above the full answer for quick recall.Answer (EN)Image`limit()` restricts the number of documents a query returns. ### Example: ```js db.users.find().limit(5) ``` This query returns only **5 documents**, even if the collection has thousands. ### Why it's used: - to avoid pulling too much data at once - to speed up the query - it's handy for pagination (e.g. by page) **Summary:** `limit()` is a cap on how many results come back.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.