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

Use readOnce: true for $sample cursors

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Blocked
    • Major - P3
    • Resolution: Unresolved
    • 4.1.7
    • None
    • Aggregation Framework
    • Query Execution
    • Query 2020-03-23

    Description

      This is a feature request to enhance the behaviour of the $sample aggregation command by adding to the plan optimizer the WiredTiger “readOnce: true” option for MongoDB cursors (SERVER-36068).

      The intended purpose behind this enhancement is so $sample does not (or is less likely to) cache the result set.  A sample by definition is unlikely to be used again by subsequent samples, thereby caching has no benefit and only serves to add unwanted cache pressure and workload contention. 

      Attachments

        Issue Links

          Activity

            People

              backlog-query-execution Backlog - Query Execution
              luke.prochazka@mongodb.com Luke Prochazka
              Votes:
              1 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated: