MongoDB aggregation $group stage $top vs $first efficiency over a large data set
I have a large data set (hundreds of millions) with documents like then below running in Mongo 7.0. The documents are much larger but these are the fields related to this question. { "groupId": "12345", "actionPerformed": "someAction", "date": "2023-08-17T18:16:58.000Z" //…