This avoids building the _id (group key) objects while processing inputs to $group. Instead it just remembers the values of the fields, and saves building the object until it is preparing the output.
1.1 KiB
1.1 KiB