发布于 2015-09-14 15:08:06 | 175 次阅读 | 评论: 0 | 来源: 网络整理

dbStats

The dbStats command returns storage statistics for a given database. The command takes the following syntax:

{ dbStats: 1, scale: 1 }

The value of the argument (e.g. 1 above) to dbStats does not affect the output of the command. The scale option allows you to specify how to scale byte values. For example, a scale value of 1024 will display the results in kilobytes rather than in bytes.

The time required to run the command depends on the total size of the database. Because the command has to touch all data files, the command may take several seconds to run.

In the mongo shell, the db.stats() function provides a wrapper around this functionality. See the “数据库统计参考” document for an overview of this output.

最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务