[SERVER-19183] Allow storage engines to provide optimized random cursors for use by $sample Created: 29/Jun/15 Updated: 19/Sep/15 Resolved: 08/Aug/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework, Storage, WiredTiger |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.7 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Geert Bosch |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Sprint: | Quint Iteration 7 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
The initial implementation of $sample will involve a collection scan if it is the first stage in the pipeline. This could be dramatically improved if we exposed a way for storage engines to provide a random cursor that would do something more efficient like a random walk on a B-Tree to get pseudo-random results. This will only track the storage engine API and WiredTiger implementation of getRandomCursor(), work on integrating this into the aggregation pipeline will be tracked on |
| Comments |
| Comment by Githook User [ 28/Aug/15 ] |
|
Author: {u'username': u'GeertBosch', u'name': u'Geert Bosch', u'email': u'geert@mongodb.com'}Message: |
| Comment by Githook User [ 08/Aug/15 ] |
|
Author: {u'username': u'GeertBosch', u'name': u'Geert Bosch', u'email': u'geert@mongodb.com'}Message: |