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

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

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

怪我咯
怪我咯

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

reply all(1)
刘奇

Yes, including embedded subdocuments.

This limit is to prevent a single document from being too large and occupying too much memory or network bandwidth when fully read. According to the current main developers of MongoDB, they do not plan to release this restriction, but will increase it moderately as the relative cost of computing resources decreases (cheaper memory, faster network).

Official explanation:

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; it is not a technical limit on document sizes. The thinking is that 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 that the maximum document size is a limit that ensures each document does 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 a gigabit ethernet connection. In this situation one would be limited to 1 request per second.

Over time, as computers grow in capacity, the limit will be adjusted upward.
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!