To find the shard key of an existing sharded collection, use the 要查找现有分片集合的分片键,请使用db.printShardingStatus()
method:db.printShardingStatus()
方法:
db.printShardingStatus()
For details on the 有关db.printShardingStatus()
output, see sh.status()
.db.printShardingStatus()
输出的详细信息,请参阅sh.status()
。