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

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

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

怪我咯
怪我咯

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

répondre à tous (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; 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.
    Derniers téléchargements
    Plus>
    effets Web
    Code source du site Web
    Matériel du site Web
    Modèle frontal
    À propos de nous Clause de non-responsabilité Sitemap
    Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!