Docs HomeMongoDB Manual

db.printCollectionStats()

db.printCollectionStats()

Provides a wrapper around the db.collection.stats() method. Returns statistics from every collection separated by three hyphen characters.提供一个围绕db.collection.stats()方法的包装器。返回由三个连字符分隔的每个集合的统计信息。

Note

The db.printCollectionStats() method run in mongosh does not return JSON. Use db.printCollectionStats() for manual inspection, and db.collection.stats() in scripts.mongosh中运行的db.printCollectionStats()方法不返回JSON。使用db.printCollectionStats()进行手动检查,并在脚本中使用db.collection.stats()

Tip

See also: 另请参阅: