应将数据作为数据库或集合进行群集

我们将获得约1000万笔交易的特定日期交易数据-每天的数据包括来自不同集合(如市场,交易,结算等)的〜1T数据。
由于我们在任何时间点都不需要超过3天的数据-我们打算删除所有与T-3或更多有关的数据。
可能有2个选项:

1.Each trading  day being represented as a separate database  - with the standard set of collections viz marketdata,trade,settlementdata in each database
2.Every collection being appended with the date viz marketdata_10032019,marketdata_10042019 etc 

第一种选择似乎更好:

1. much cleaner in terms of maintenance - just dropping the obsolete databases,rather than scanning collections by name. 
2. Dynamic collection names as in second option puts severe restrictions in aggregation possibilities - mongo aggregation does not support dynamic names. 

希望进一步了解-基于性能,并发性,可伸缩性,群集/分片,维护等

所有先前的问题均未解决基于日期维护集合的第二级逻辑聚合分组的用例

yjukhdxfv 回答:应将数据作为数据库或集合进行群集

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3129275.html

大家都在问