I am started using MongoDB few days ago, and i have problem in understanding some database architecture. If i execute the query db.stats(); i had got filesize ,datasize,storagesize & indexsize. While i am surfing i found that the following:
Storagesize = datasize + free space allocated for collection
datasize = database size utilised by MongoDB
Here, I could not understand the representaion of filesize & datasize reprsentation. For datasize --> indexsize is also included?. Please provide a precise solution for the specified attributes and please do correct me if i mentioned anythng wrong.
Advance Thanks,
解决方案dataSize : Sum of all actual data (BSON objects) used by the database, in bytes
indexSize : Sum of all indexes used by the database, in bytes
storageSize : dataSize plus all preallocated collection space, in bytes
fileSize : Sum of the sizes of all files allocated for this database (e.g. test.0 + test.1 etc.), in bytes
nsSizeMB : Size of namespace file for this database, in megabytes.
avgObjSize : Average size of document objects in database. This value includes padding and may therefore not change when you reduce the size of documents.