MongoDB单文档大小限制是16M吗?这里包括嵌入的子文档吗?
1个回答
展开全部
是的,包括嵌入的(embedded)子文档在内。
这个限制是为了避免单个文档过大,完整读取时对内存或者网络带宽占用过高。根据目前MongoDB主开发人员的意思,他们不打算放开这个限制,但会随着计算资源相对成本的降低(内存更便宜,网络更快)而适度调高。
官方解释:MongoDB limits the data size of individual 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.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询