发布于 2015-09-14 14:53:27 | 512 次阅读 | 评论: 0 | 来源: 网络整理

sh.shardCollection(collection, key, unique)
参数:
  • collection (string) – The namespace of the collection to shard.
  • key (document) – A document containing a shard key that the sharding system uses to partition and distribute objects among the shards.
  • unique (boolean) – When true, the unique option ensures that the underlying index enforces uniqueness so long as the unique index is a prefix of the shard key.

Shards the named collection, according to the specified shard key. Specify shard keys in the form of a document. Shard keys may refer to a single document field, or more typically several document fields to form a “compound shard key.”

See

Size of Sharded Collection

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

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