Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-47619

count times out when there are over 10 million records and there is a find query used

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 4.2.5
    • Performance
    • 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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            ryan.kaltreider@myflavorprint.com Ryan Kaltreider
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: