Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-15802

[SERVER] Add detail to $sample page

    XMLWordPrintableJSON

Details

    • Task
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • None
    • None
    • manual, Server
    • None
    • true

    Description

      Two things that are probably worth clarifying:

      • The 5% threshold is not configurable. It is thought to be a good approximation of the cutoff value where scanning the entire collection will be faster than that many random I/Os.
      • If we are not under the 5% threshold, it's worth saying that we will do a top-k sort (where k = sample size) by a generated random value. This top-k sort can possibly spill to disk if K documents are larger than 100MB, and so allowDiskUse may need to be used.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              charlie.swanson@mongodb.com Charlie Swanson
              Emet Ozar Emet Ozar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                11 weeks, 5 days ago