'How to solve auto sample data storing in data collection in mongodb database?
After creating a data collection in a particular database some sample data collection is added automatically daily in that database. After deleting those sample data collection from the database then again create sample data collection automatically. How can i stop auto sample data collection creating?
Solution 1:[1]
you can set up automatic removal of documents older than a specified number of seconds by using the expireAfterSeconds parameter. To change the expiration value or to turn it off, get help from the documentation. https://www.mongodb.com/docs/manual/core/timeseries/timeseries-automatic-removal/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | aktar |