Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
4.2.5
-
None
Description
We are currently experiencing a major issue in our API. We have a call that allows the ability to get all users from a collection in mongo. To increase API performance we implemented pagination. Once we have over 10 million objects the call times out. There is only one restriction when querying the users and that is that the users must be active. We have indexed that field properly and just a find({active:true}) returns lightning fase, but for pagination we need to know total elements, so count({active:true}) takes over 30 seconds. How can we fix this moving forward?