4 ms·
It’s a memory mapped file. If you update a bool or number value it’ll rewrite just that. If you update anything else it’ll often have to rewrite the entire docu
by slver 5y ago
It’s a memory mapped file. If you update a bool or number value it’ll rewrite just that. If you update anything else it’ll often have to rewrite the entire document due to variable size.
- MaBeuLux88 5y agoThat was true with MMAPv1. It's not since March 2015, when WiredTiger was introduced with MongoDB 3.0.
- the-dude 5y agoI assume when you say just that, it will write an entire page.
- slver 5y agoIn practice yeah I guess. But rewriting the document is more extensive, it might even have to be moved (because Mongo allocates certain number of bytes for it, and it might outgrow that).