我不得不将一百万个文档存储到Mongodb中。Mongodb集群由4个分片,1个mongos和1个配置服务器组成。
如何获取文档的详细信息,例如:
嗨,您可以使用expalain()查找文档的位置
查找文档位置的步骤
1. Open Mongos terminanl
2. Switch to your databse
3. find document of which you want to search location using explain()
eg db.collection.find({"x":1234}).explain()
您将获得json格式的结果,在其中寻找分片密钥。更多细节检查链接
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句