Analyzing MongoDB Pagination Performance Differences
Source: https://arpitbhayani.me/blogs/benchmark-and-compare-pagination-approach-in-mongodb Date: 2017-03-24
Benchmark of MongoDB pagination strategies! See which method (_id vs skip/limit) performs best for large datasets. Find the code on GitHub.
MongoDB is a document based data store and hence pagination is one of the most common use case of it. So when do you paginate the response? The answer is pretty neat; you paginate whenever you want to process result in chunks. Some common scenarios are
- Batch processing
- Showing huge set of results on user interface
There are multiple approaches through which you can . This blog post is dedicated for results of benchmark of two approaches and its analysis, so here we go …
