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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Done
    • Affects Version/s: 4.2.5
    • Fix Version/s: None
    • Component/s: Performance
    • Labels:
      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

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

              Dates

              Created:
              Updated:
              Resolved: