> db.stats();
{
"db" : "test", //當(dāng)前數(shù)據(jù)庫
"collections" : 3, //當(dāng)前數(shù)據(jù)庫多少表
"objects" : 4, //當(dāng)前數(shù)據(jù)庫所有表多少條數(shù)據(jù)
"avgObjSize" : 51, //每條數(shù)據(jù)的平均大小
"dataSize" : 204, //所有數(shù)據(jù)的總大小
"storageSize" : 16384, //所有數(shù)據(jù)占的磁盤大小
"numExtents" : 3,
"indexes" : 1, //索引數(shù)
"indexSize" : 8176, //索引大小
"fileSize" : 201326592, //預(yù)分配給數(shù)據(jù)庫的文件大小
"nsSizeMB" : 16,
"dataFileVersion" : {
"major" : 4,
"minor" : 5
},
"ok" : 1
}
> db.posts.stats();
{
"ns" : "test.posts",
"count" : 1,
"size" : 56,
"avgObjSize" : 56,
"storageSize" : 8192,
"numExtents" : 1,
"nindexes" : 1,
"lastExtentSize" : 8192,
"paddingFactor" : 1,
"systemFlags" : 1,
"userFlags" : 0,
"totalIndexSize" : 8176,
"indexSizes" : {
"_id_" : 8176
},
"ok" : 1
}