Saturday 21 February 2015

mongoDB : Get statistics about the collection


db.collection.stats() method is used to get statistics about the collection.

> db.students.stats()
{
        "ns" : "school.students",
        "count" : 10000000,
        "size" : 1120000000,
        "avgObjSize" : 112,
        "storageSize" : 1580150784,
        "numExtents" : 19,
        "nindexes" : 1,
        "lastExtentSize" : 415174656,
        "paddingFactor" : 1,
        "systemFlags" : 0,
        "userFlags" : 1,
        "totalIndexSize" : 324456384,
        "indexSizes" : {
                "_id_" : 324456384
        },
        "ok" : 1
}

Prevoius                                                 Next                                                 Home

No comments:

Post a Comment