[SERVER-3141] distinct needs to have a way to output to a cursor for large result sets Created: 25/May/11  Updated: 06/Dec/22  Resolved: 22/Oct/21

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

Type: New Feature Priority: Major - P3
Reporter: Valentin Kuznetsov Assignee: Backlog - Query Optimization
Resolution: Won't Do Votes: 8
Labels: query
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to CXX-1126 collection::distinct return should al... Closed
is related to SERVER-25899 Make the distinct command always exec... Backlog
Assigned Teams:
Query Optimization
Participants:

 Description   

For use case please see http://groups.google.com/group/mongodb-user/browse_frm/thread/b9de8d8c90125ddd

The current distinct operation return different from cursor type, the list. The returned list can be large, which creates problem at application level. For example, making pagination become cumbersome, since it requires to fetch the list at every page, rather then using cursor/idx/limit/count operations. The situation get worse in concurrent applications.



 Comments   
Comment by Robert La Ferla [ 07/Aug/12 ]

This doesn't appear to be working in 2.1.2 nor 2.2.0-rc0. I really need distinct to return a cursor because I have a large database with 25M records to work with.

Comment by Eliot Horowitz (Inactive) [ 25/Oct/11 ]

Not at this time.
The new aggregration framework should be in 2.2, and therefore in 2.1 at some point.
You can follow SERVER-447

Comment by Zac Witte [ 25/Oct/11 ]

@Eliot, have any update for us? This would be hugely useful.

Comment by Eliot Horowitz (Inactive) [ 26/May/11 ]

This may be handled by the new aggregation framework

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