对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

db.printShardingStatus()(mongosh方法)

db.printShardingStatus()

打印分片配置的格式化报告以及有关分片集群中现有数据块的信息。

Only use db.printShardingStatus() when connected to a mongos instance.

The db.printShardingStatus() method has the following parameter:

Parameter
类型
说明

verbose

布尔

可选。确定详细级别。

如果 true,则该方法将显示:

如果 false,则该方法将显示:

  • 仅当数据段少于 20 个时,才会显示跨分片数据段分布的完整详情。如果有 20 个或更多数据段,该方法会返回 too many chunks to print ... 消息,仅显示每个分片上的数据段个数。

默认的详细值为 false。

有关输出的详细信息,请参阅 sh.status()(mongosh方法)。

注意

The db.printShardingStatus() method run in mongosh does not return JSON. Use db.printShardingStatus() for manual inspection, and Reference could not be replaced: reference/config-database/ in scripts.

此方法可用于以下环境中托管的部署:

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud

重要

This command is not supported in M0 and Flex clusters. For more information, see Unsupported Commands.

给本页内容打分

在此页面上