I
I
IDONTSUDO2019-09-04 17:36:59
MongoDB
IDONTSUDO, 2019-09-04 17:36:59

MongoDB data with expiration date?

I want to create documents with limited lifetime. My lifetime of this data will be equal to 5 days. I found special methods that do this in MongoDB. And I read in the documentation that once every 60 seconds. All documents are requested and the changes are applied. Because I want to do this for chat messages. There will be many such documents.
Question. How will this affect performance? Are there alternative exits? And if it somehow shakes the performance. Can I change the frequency of the cycle that is responsible for cleaning the data?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question