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

changestream fullDocument lookup projections introduce overheads in degenerate cases

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Execution

      We are interested in projecting a subset of fields from the post-image document in a changestream.

      Testing showed (also see CLOUDP-91896) that performance only improves when the projection is smaller than some fraction of the total document size (as a function of network delay etc).

      When most fields in the document are projected, there could be a 30% slowdown.

      Is it possible to optimize changestream projection so that overheads for degenerate cases is minimized? Otherwise it is hard to determine whether or not Search can use this optimization for a certain collection.

      Note that in this case, the projection only applies to fields nested under `fullDocument.*`, so it is possible to push the projection down to the query system (by a query optimization or by exposing new APIs)

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            oren.ovadia@mongodb.com Oren Ovadia
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: