title: Why is SQL Server BLOB upload taking up so much space?
body: <p>I'm writing a python program where a directory of BLOBs get uploaded to SQL Server. I noticed that BLOBs larger than 5MB all cause SQL server to hang, so as a workaround I am breaking those BLOBs into 5MB chunks and appending them to each other. 
  So, for a given BLOB, the first chunk will be uploaded using: </p>
  
  <pre><code>INSERT INTO stored_files (blob_data, uploaded_files_id) VALUES (CONVERT(VARBINARY(MAX),"0x" + binascii.hexlify(data_chunk),1), uploaded_files_id_value); SELECT SCOPE_IDENTITY() AS stored_files_id 
  </code></pre>
  
  <p>And the subsequent chunks are uploaded using:</p>
  
  <pre><code>UPDATE stored_files SET blob_data = blob_data + CONVERT(VARBINARY(MAX),"0x" + binascii.hexlify(data_chunk),1) WHERE stored_files_id = uploaded_files_id_value;
  </code></pre>
  
  <p>The BLOBs are being stored in the database as VARBINARY(max).</p>
  
  <p>My issue arises when I try to upload a file that is 140,900kb. For some reason, when I upload it as chunks, it ends up taking up 6GB on my hard drive. What part of this process is taking up so much space?</p>