开发者

MongoDB RSS Feed Entries, Embed the Entries in the Feed Object?

开发者 https://www.devze.com 2022-12-26 08:57 出处:网络
I am saving a reference to an RSS Feed in MongoDB, each Feed has an ever growing list of Entries.As I\'m designing my schema, I\'m concerned about this statement from the MongoDB Schema Design - Embed

I am saving a reference to an RSS Feed in MongoDB, each Feed has an ever growing list of Entries. As I'm designing my schema, I'm concerned about this statement from the MongoDB Schema Design - Embed vs.开发者_StackOverflow中文版 Reference Documentation:

If the amount of data to embed is huge (many megabytes), you may read the limit on size of a single object.

This will surely happen if I understand the statement correctly. So the question is, I am correct to assume that I should not embed the Feed Entries within a Feed because I'll eventually reach the limit on size of a single object?


In designing your schema, you should be cognizant of the 4MB size limit on a single document in Mongo.

SERVER-431 states:

the 4mb limit isn't a hard limit per se, its easy to change. the reson its there and we really like it is that it keeps performance uniform, lets drivers make some assumption about input to make, and generally prevents really horrible things from happening.

if there is a large consensus that it should change however, we certainly could.

0

精彩评论

暂无评论...
验证码 换一张
取 消