Database Reference
In-Depth Information
cast
to all shards. To shard the
social.post
collection on
_id
, then, we need to execute the
following command:
>>>
>>>
db
.
command
(
'shardcollection'
,
'dbame.social.post'
, {
...
...
'key'
: {
'_id'
:
1
} } )
{ "collectionsharded": "dbname.social.post", "ok": 1 }