db.printCollectionStats()
Provides a wrapper around the 提供db.collection.stats()
method. db.collection.stats()
方法的包装。Returns statistics from every collection separated by three hyphen characters.返回由三个连字符分隔的每个集合的统计信息。
The 在db.printCollectionStats()
method run in mongosh
does not return JSON. mongosh
中运行的db.printCollectionStats()
方法不返回JSON。Use 使用db.printCollectionStats()
for manual inspection, and db.collection.stats()
in scripts.db.printCollectionStats()
进行手动检查,并在脚本中使用db.collection.stats()
。