Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-19183

Allow storage engines to provide optimized random cursors for use by $sample

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Epic Link:
    • Sprint:
      Quint Iteration 7

      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 SERVER-19182

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: