File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ key. Consider the following properties when using a hashed shard key:
365365 shard or set of shards; however, the :program:`mongos` must route
366366 range queries to all shards.
367367
368- - When using a hashed shard key on a collection without data , MongoDB
368+ - When using a hashed shard key on a new collection , MongoDB
369369 automatically pre-splits the range of 64-bit hash values into
370370 chunks. By default, the initial number of chunks is equal to twice
371371 the number of shards at creation time. You can change the number of
@@ -375,6 +375,10 @@ key. Consider the following properties when using a hashed shard key:
375375 .. code-block:: javascript
376376
377377 db.adminCommand( { shardCollection: "test.collection", key: { a: "hashed"}, numInitialChunks: 2001 } )
378+
379+ Note: pre-splitting only occurs when sharding empty collections. The
380+ chunks will not be pre-split when sharding collections that already
381+ have data.
378382
379383.. warning::
380384
You can’t perform that action at this time.
0 commit comments