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

      On a small performance comparison using the query

      [
        {$project: {
          f0: {$setUnion: ["$f0","$f1"]},
          f1: {$setUnion: ["$f0","$f1"]},
          …, 
          f19: {$setUnion: ["$f0","$f1"]}}
        },
        {$project: {f0: 1}}
      ]
      

      classic needs ~20,000 msecs while SBE needs ~8,000 msecs.

      In classic engine, setUnion is implemented using an std::set.
      In SBE engine, setUnion is implemented using a flat_hash_set

      Replacing set::set with flat_hash_set in classic should close this gap.

            Assignee:
            Unassigned
            Reporter:
            Foteini Alvanaki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: