Speed up SequentialDocumentCache

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0, 9.0.0-rc2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • v9.0
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We can improve performance of the SDC with two small enhancements:

      1. For modified documents (not already BSON-backed) we re-serialize them once and store them in the cache so that we don't repeat this work each time we loop over the cache.

      2. Add a fast-path that matches against the entire BSON document for documents that are trivially convertible and below some threshold size. This saves us the work of (re-) producing a projected document each time we loop.

      For UncorrelatedPrefixJoin and other $lookup / $match benchmarks, this can result in substantial speed-ups.

            Assignee:
            Colin Stolley
            Reporter:
            Colin Stolley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: