qlik-oss / mongocursorpagination

MIT License
5 stars 9 forks source link

more effective paginator #35

Closed alexanderpalsson closed 2 years ago

alexanderpalsson commented 2 years ago

There is a scaling problem with the paginator where the response time increase with the count of pages that have been paginated.

The problem can be solved by changing the $eq operator to $lte, then hinting at the correct index. We see no indication of any degradation changing this it seems to always perform equal or better.

We have run multiple tests against the staging database and with this change for example one of the biggest users in perf4:

Pre fix

Screenshot 2022-09-19 at 09 50 57

After fix Screenshot 2022-09-20 at 10 14 07

Mongo cpu before and after change:
image (5)