MongoDB 集群

2020-05-21  本文已影响0人  北海北_6dc3

分片群集

MongoDB分片群集由以下组件组成:

分片键

MongoDB使用分片在各个分片之间分发集合的文档。分片由目标集合中每个文档中存在的一个或多个字段组成。
在分片集合时选择分片键。分片后不能更改分片键的选择。分片集合只能有一个分片键。

To shard a non-empty collection, the collection must have an index that starts with the shard key. For empty collections, MongoDB creates the index if the collection does not already have an appropriate index for the specified shard key.

上一篇 下一篇

猜你喜欢

热点阅读