小编Nil*_*ils的帖子

MongoDB 为复合分片键预拆分块

在我的 mongodb 设置中,我有一个复合分片键{"region" : 1, "foo" : 1, "bar" : 1},我知道值区域可以是,并且每个区域应该在一个块上。

因此,我只想根据区域键进行预拆分。之后的分片状态应如下所示:

{ "region": { "$minKey" : 1 }, "foo": { "$minKey" : 1 }, "bar": { "$minKey" : 1 } } -> { "region": region1, "foo": { "$minKey" : 1 }, "bar": { "$minKey" : 1 } } on: shard1
{ "region": region1, "foo": { "$minKey" : 1 }, "bar": { "$minKey" : 1 } } -> { "region": region2, "foo": { "$minKey" : 1 }, "bar": …
Run Code Online (Sandbox Code Playgroud)

mongodb sharding

5
推荐指数
1
解决办法
1534
查看次数

标签 统计

mongodb ×1

sharding ×1