-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
In scenarios where `$merge` specifies `whenNotMatched: "insert"` we could use insert path with catching duplicate error when the `whenMatched: "fail"` is specified and ignoring duplicate errors when `whenMatched:"keepExisting"` is specified. Apparently we use updates with `upsert` in both cases which is less performant and cannot be batched into a single `insertMany`.