[SERVER-2801] Combine distinct and count Created: 19/Mar/11 Updated: 16/Nov/21 Resolved: 10/Jan/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 1.8.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Sergei Tulentsev | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 11 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
There are use cases when you don't want all the distinct values (or they don't fit in the limit), you want their number. It would be great to have and optimized command for that (as an alternative to slow Map/Reduce that creates temp collections). |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 10/Jan/13 ] |
|
You can now do this very efficiently with the aggregation framework. |
| Comment by Sergei Tulentsev [ 28/Sep/11 ] |
|
No, it does not add this capability. |
| Comment by Srirang G Doddihal [ 03/Jun/11 ] |
|
Does this also add the capability of limiting the number of entries returned by distinct? With the current 1.8.2-rc3 I do not see limit working with distinct. |
| Comment by Sergei Tulentsev [ 20/Mar/11 ] |
|
Fixed and created pull request: https://github.com/mongodb/mongo/pull/34 |