title: Apache Hive: LOAD DATA vs INSERT OVERWRITE OUTPUT FILE SIZE
body: <p>I am working with Apache Hive and I don't understand why the size of the table doubles if I load the data with INSERT OVERWRITE vs LOAD. As follows is an illustration of the problem:</p>
  
  <p>I created a table item
  Loaded the data from item.dat (aprox 28MB)
  In Azzure what happens is that the file item.dat will be moved to hive/warehouse and off course the size remains the same </p>
  
  <p>Now if I create another table item2 same as item and then load the data from item to item2 with the following command:</p>
  
  <pre><code>INSERT OVERWRITE TABLE item2
  SELECT * FROM item
  </code></pre>
  
  <p>the size of table item2 is double of item (aprox 55MB)</p>
  
  <p>Why does this happen? And is there any way to avoid it?</p>
  
  <p>ps. this is only to illustrate the problem. In practice I am interested for pre-joining tables but INSERT OVERWRITE increases the size of the joined table drastically (Actual problem: 4GB joined with 28MB gives 18GB)  </p>