3 ms·
Mongo stores objects pretty much the same as PG here, a single key update requires a rewrite of the object. Maybe Mongo has some fancy algorithms to avoid full
by jabberwcky 6y ago
Mongo stores objects pretty much the same as PG here, a single key update requires a rewrite of the object. Maybe Mongo has some fancy algorithms to avoid full decode/reencode in some cases, but in principle the physical data formats are almost identical
- isbvhodnvemrwvn 6y agoIn a tiny bit more detail - mongo uses BSON, which is effectively TLV encoded json. I'm not sure how storage of entire collections is done though. https://en.wikipedia.org/wiki/BSON https://en.wikipedia.org/wiki/BSON
- rualca 6y ago> (...) BSON, which is effectively TLV encoded json. For those who, like me, never heard of TLV prior to this post, it's type-length-value encoding. https://en.wikipedia.org/wiki/Type-length-value https://en.wikipedia.org/wiki/Type-length-value
- swyx 6y agothanks for the link, you weren't alone