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 san 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.
是的,包括嵌入的(embedded)子文檔在內。
這個限制是為了避免單一文件過大,完整讀取時對記憶體或網路頻寬佔用過高。根據目前MongoDB主開發人員的意思,他們不打算放開這個限制,但會隨著運算資源相對成本的降低(記憶體更便宜,網路更快)而適度調高。
官方解釋: