MongoDB中的文件大小和数据大小是什么意思? [英] What is meant by filesize and datasize in MongoDB?
问题描述
几天前,我开始使用MongoDB,但在理解某些数据库体系结构时遇到了问题.如果我执行查询db.stats();我有文件大小,数据大小,存储大小和indexsize.当我冲浪时,我发现以下内容:
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 =数据大小+分配给收集的可用空间
Storagesize = datasize + free space allocated for collection
datasize = MongoDB使用的数据库大小
datasize = database size utilised by MongoDB
在这里,我无法理解fileize&数据大小表示.对于datasize->还包括indexsize吗?请为指定的属性提供精确的解决方案,如果我提到任何错误,请纠正我.
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.
提前谢谢,
推荐答案
- dataSize:数据库使用的所有实际数据(BSON对象)的总和,以字节为单位
- indexSize:数据库使用的所有索引的总和,以字节为单位
- storageSize:dataSize加上所有预分配的收集空间(以字节为单位)
- fileSize:为该数据库分配的所有文件的大小之和(例如,test.0 + test.1等),以字节为单位
- nsSizeMB:此数据库的名称空间文件的大小,以兆字节为单位.
- avgObjSize:数据库中文档对象的平均大小.此值包括填充,因此在减小文档大小时可能不会更改.
- 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.
这篇关于MongoDB中的文件大小和数据大小是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!