How many collections are possible in a MongoDB without losing performance?

旧巷老猫 提交于 2019-12-22 09:15:38

问题


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?


回答1:


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

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

Documentation




回答2:


I think thats the same as another DB... higher, it becomes more slower..



来源:https://stackoverflow.com/questions/7521664/how-many-collections-are-possible-in-a-mongodb-without-losing-performance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!