I wanted to delete millions of old records.date is a field we can use that

Not that this suggestion would help out much at this time, but if you know that records will not be valid after a certain period of time and you’re just going to delete them, you could look at using a TTL index and let the database engine remove the records after a certain period of time based on a date field. At high volumes of data this might not be the right approach (you would need to test as best as you can), but in some scenarios it might work well for you.

2 Likes