I need to manage the acquisition of many records per hour. About the 1000000records. And I need to get every second the last insertion value for each primary key. It works great with shards. I was thinking of trying to use the os capped collection to get only the last record for each primary key. To do this, I made two separate inserts, is there a way, in mongodb, to make some kind of trigger to distribute the insert into the collection into another collection?
source
share