This repository contains Python code that benchmarks the two approaches for implementing pagination in MongoDB
- Using
cursor.skip
andcursor.limit
- Using
_id
andcursor.limit
All required packages are put into requirements.lock file so all you need to run is the following command
pip install -r requirements.lock
python main.py
The results and analysis are compiled in this blog post