发布于 2015-09-14 15:04:35 | 226 次阅读 | 评论: 0 | 来源: 网络整理

db.collection.stats(scale)
参数:
  • scale – Optional. Specifies the scale to deliver results. Unless specified, this command returns all sizes in bytes.
返回:

A document containing statistics that reflecting the state of the specified collection.

This function provides a wrapper around the database command collStats. The scale option allows you to configure how the mongo shell scales the sizes of things in the output. For example, specify a scale value of 1024 to display kilobytes rather than bytes.

Call the db.collection.stats() method on a collection object, to return statistics regarding that collection. For example, the following operation returns stats on the people collection:

db.people.stats()

也可以参考

集合统计” for an overview of the output of this command.

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

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