发布于 2015-09-14 14:50:31 | 175 次阅读 | 评论: 0 | 来源: 网络整理

sh.splitAt(namespace, query)
参数:
  • namespace (string) – Specify the namespace (i.e. “<database>.<collection>”) of the sharded collection that contains the chunk to split.
  • query (document) – Specify a query to identify a document in a specific chunk. Typically specify the shard key for a document as the query.

Splits the chunk containing the document specified by the query as if that document were at the “middle” of the collection, even if the specified document is not the actual median of the collection. Use this command to manually split chunks unevenly. Use the “sh.splitFind()” function to split a chunk at the actual median.

In most circumstances, you should leave chunk splitting to the automated processes within MongoDB. However, when initially deploying a sharded cluster it is necessary to perform some measure of pre-splitting using manual methods including sh.splitAt().

最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务