title: MongoDB: Does saving a document rewrite the whole document?
body: <p>I have the collection <code>domain</code> with documents that contain domain information. Part of that is the historical whois records, which may be zero or more and by far take up the majority of the space for the document.</p>
  
  <p>If I load the entire document, change something small (like update a number field) and use the <code>save()</code> method will mongo flush the entire document to disk or only update the BSON that has changed? Ultimately my question is, should I bother complicating my code with <code>update()</code>'s to save on I/O or should I just use <code>save()</code>?</p>
  
  <p>This isn't purely due to lazyness, the document (after it gets read in entirety) goes through a series of steps to modify/process the document and if any changes have been made the entire document is saved. But if the cost of saving the document is high then maybe I have to think about it a different way...</p>