nosql - MongoDB单文档大小限制是16M吗?这里包括嵌入的子文档吗?
怪我咯
怪我咯 2017-04-21 10:56:10
0
1
1065

从官方文档http://cn.docs.mongodb.org/manual/ref...:
BSON Object Size
The maximum BSON object size is 16 megabytes.

这是指单文档限制16M吗?包括嵌入的子文档吗?

怪我咯
怪我咯

走同样的路,发现不同的人生

全部回覆(1)
刘奇

是的,包括嵌入的(embedded)子文檔在內。

這個限制是為了避免單一文件過大,完整讀取時對記憶體或網路頻寬佔用過高。根據目前MongoDB主開發人員的意思,他們不打算放開這個限制,但會隨著運算資源相對成本的降低(記憶體更便宜,網路更快)而適度調高。

官方解釋:

MongoDB limits the data size of inpidual BSON objects/documents. At the time of this writing the limit is 16MB.

This limit is designed as a sanity-check; if documents are larger than this size, it is likely the schema is not ideal. Further it allows drivers to make some assumptions on the max size of documents.

The concept is s sizes size of the sizes sage s​​an s” not require an excessive amount of RAM from the machine, or require too much network bandwidth to fetch. For example, fetching a full 100MB document would take over 1 second to fetch over aigabit ethernet consiection. request per second.

Over time, as computers grow in capacity, the limit will be adjusted upward.
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板