28

mongodb为日志表设置归档方案 - - SegmentFault 思否

 4 years ago
source link: https://segmentfault.com/a/1190000020888349
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
现在mongodb有一张日志表,保留每天的系统访问信息,由于每天的数量非常大,导致长时间之后表变得非常大,影响插入效率,并且导致无法查询,现在我们需要制定方案来解决这个问题,需求是实现表的按时清理和归档。要求是尽量不修改项目现有的业务代码。并且现在数据库的大概每天产生30至60万条数据,能够平稳的处理。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK