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

Allow MatchExpression to match Document

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

      $match converts its input to BSON because MatchExpression only takes BSON or MatchableDocument.

      Converting Document to BSON made sense when this code was written, but is tech debt we should consider addressing.

      The amount of time spent performing this conversion is close to the time it takes to actually perform the match. (Flamegraph attached. This data was taken from TPCH Q7.) $match could be significantly faster.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            matt.boros@mongodb.com Matt Boros
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: