2 ms·
Would it be an antipattern (design and performance wise) to have huge documents in rethinkdb? for example, using a single document for each user in a web app.
by Scarbutt 10y ago
Would it be an antipattern (design and performance wise) to have huge documents in rethinkdb? for example, using a single document for each user in a web app.
- chucksmash 10y agoI'll let someone else field that because I'm not knowledgeable enough to say one way or the other. The inter-document JOINs were one of the features that first drew me in so all I can say is it doesn't match my usage.
- embwbam 10y agoI've found this to be the case. While RethinkDB has many features to help you drill in to nested content, you'll end up missing document-level features fairly soon and want to split things up.
- voiper1 10y agoThe database log is append only (with GC aterwards) so a one byte change on a large document re-writes the entire document. From https://rethinkdb.com/docs/data-modeling/ https://rethinkdb.com/docs/data-modeling/: Disadvantages of using embedded arrays: Deleting, adding or updating a post requires loading the entire posts array, modifying it, and writing the entire document back to disk. Because of the previous limitation, it’s best to keep the size of the posts array to no more than a few hundred documents.