MongoDB中可能有多少个集合而不会失去性能? [英] How many collections are possible in a MongoDB without losing performance?

查看:628
本文介绍了MongoDB中可能有多少个集合而不会失去性能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到默认情况下,一个MongoDB有24,000个集合可用的16MB .ns 文件。如果我增加到2GB(最大),我可以然后在数据库中获取 3,000,000 集合?

I saw that by default, a MongoDB has 24,000 collections available with a 16MB .ns file. If I increase that to 2GB (the max), can I then get 3,000,000 collections in a DB? Will there be any substantial performance decrease?

推荐答案

根据文档,大量的集合不会影响性能(几乎不会)。

According to documentation large number of collections will not affect performance (almost not).


具有大量集合没有显着的性能
惩罚,并且效果非常好

having a large number of collections has no significant performance penalty, and results in very good performance

如果您需要更多集合,可以通过 - nssize增加 .ns 参数最多为2GB。

If you need more collection you can increase .ns file via --nssize parameter up to 2GB.

文档

这篇关于MongoDB中可能有多少个集合而不会失去性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆