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

Use readOnce: true for $sample cursors

    XMLWordPrintable

    Details

    • Sprint:
      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

              Assignee:
              backlog-query-execution Backlog - Query Execution
              Reporter:
              luke.prochazka Luke Prochazka
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              16 Start watching this issue

                Dates

                Created:
                Updated: