I have a large collection in Mongo. Around 1.7 billion records that take up around 5TB of storage space. I no longer need to keep this data indefinitely so I'm looking at options for getting rid of most of the data, preferably based on "createdAt".
I'm wondering what to expect if I add a ttl index to only keep records around for a month at the most. I have the following index currently:
{
"v" : 1,
"key" : {
"createdAt" : 1
},
"name" : "createdAt_1",
"ns" : "someNS.SomeCollection",
"background" : true
}
How quickly would mongo be able to delete all that data? From what I've read, the ttl process runs every 60 seconds. How much data does it delete each time around?