• Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Blocker - P1 Blocker - P1
    • None
    • Affects Version/s: 2.4.9
    • Component/s: Aggregation Framework
    • ALL
    • Hide

      Collection posts: ~10 millions documents.
      Total DB: ~20GB
      4 CPUs
      RAM: 3GB
      Swap: 1GB
      HDD: 100GB (25GB Used, 69G Available)

      Put indexes on : author (String), permalink (String), tags (array).

      Get the first five used tags:
      db.posts.aggregate(
      {$unwind: "$tags"},
      {$group: {_id:

      {id: "$_id", tag: "$tags"}

      , counter:{$sum: 1}}},
      { $sort :

      { counter : -1}

      },
      {$limit:5}
      )

      Show
      Collection posts: ~10 millions documents. Total DB: ~20GB 4 CPUs RAM: 3GB Swap: 1GB HDD: 100GB (25GB Used, 69G Available) Put indexes on : author (String), permalink (String), tags (array). Get the first five used tags: db.posts.aggregate( {$unwind: "$tags"}, {$group: {_id: {id: "$_id", tag: "$tags"} , counter:{$sum: 1}}}, { $sort : { counter : -1} }, {$limit:5} )

      In a virtual environment with ~20GB of data. It uses 98MB of 3GB available RAM, just one connection to DB, and using the aggregation framework.

      When i execute the query bellow the Memory it is used without mesure and finally my DB it is killed.

            Assignee:
            amalia.hawkins@10gen.com Amalia Hawkins
            Reporter:
            dmartz86 Daniel Martinez
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: