Benchmarks two approaches to paginate in MongoDB
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
dbinit.py
dbutil.py
fetch.py
main.py
populate.py
requirements.lock
stats.py

README.md

Mongo Pagination Benchmark

This repository contains Python code that benchmarks the two approaches for implementing pagination in MongoDB

  • Using cursor.skip and cursor.limit
  • Using _id and cursor.limit

Setup

All required packages are put into requirements.lock file so all you need to run is the following command

pip install -r requirements.lock

Execute

python main.py

The results and analysis are compiled in this blog post