[SERVER-2292] Can't group when the count of data more than 20000 Created: 28/Dec/10  Updated: 28/Dec/10  Resolved: 28/Dec/10

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 1.7.4
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: xuqing Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS:Win2003 x64 Enterprise
FileSystem:NTFS
MongoVersion:1.7.4


Operating System: ALL
Participants:

 Description   

I have a collection contains 821463 document in mongodb,I want to group the document by a key named MacId.My command is below:



 Comments   
Comment by Eliot Horowitz (Inactive) [ 28/Dec/10 ]

This is a limitation of group that will not be changed.

Currently you can use map/reduce as an alternative.

In the future, this will be available:

SERVER-447

Comment by xuqing [ 28/Dec/10 ]

My command is below:
db.tMac.group(
{key:

{ MacId:true }

,
cond: { },
reduce: function(obj,prev)

{ prev.csum ++; }

,
initial:

{ csum: 0 }

});

Generated at Thu Feb 08 02:59:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.