title: MySQL LOAD DATA LOCAL INFILE vs. SQL file
body: <p>Every day we load around 6GB of CSV files into MySQL using:</p>
  
  <p><code>
  LOAD DATA LOCAL INFILE 'file$i.csv' INTO TABLE tableName FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '\n';
  </code></p>
  
  <p>We have 6 files that goes through this process, so it takes some time. Since we generate these files ourselves, we're in control of what format it gets outputted as.</p>
  
  <p>Originally we chose CSV because this was a smaller process and we needed the data to be moved around and easily read by a non-developer. Now however, it's not so much of an issue since the loading time is so dramatic, we're now talking hours.</p>
  
  <p>Is it quicker to output each row as an <code>INSERT</code> query into a single file and execute that or is CSV still quicker?</p>
  
  <p>We're using the InnoDB storage engine.</p>