improve the performance of complex counts

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In SERVER-1752 you have optimized the speed for simple queries count
      db.Comment.count(

      {appId:1,topicId:1}

      )

      I think it would be very usefull an improvement for more complex queries.
      Now for large collections counts like this are very slow
      db.Comment.count({appId:{$in:[1,2]}})
      db.Comment.count({$or:[

      {appId:1}

      ,

      {appId:2}

      ]})

              Assignee:
              Unassigned
              Reporter:
              Ovidiu Anicai
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: