获取stats
from pymongo import MongoClient
client = MongoClient()
db = client.test
print collection statistics
print db.command("collstats", "events")
print(db.command("collstats", "messages")["storageSize"])
print database statistics
print db.command("dbstats")
Original: https://www.cnblogs.com/buxizhizhoum/p/14982095.html
Author: Go_Forward
Title: mongo笔记
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/684488/
转载文章受原作者版权保护。转载请注明原作者出处!