Mongodb – Is $push+$reduce really slower than a custom accumulator?
Let's say I have a few million documents in a MongoDB collection that look like this: [ { "timestamp": "2024-01-01T00:00:00Z", "schema": "1.0.0", "value": 3, }, { "timestamp": "2024-01-01T01:00:00Z", "schema": "1.2.0", "value": -10, }, ... ] Now, I want to do…