title: Innodb Performance Optimization
body: <p>One of the portion of my site requires bulk insert, it takes around 40 mins for innodb to load that file into database. I have been digging around the web and found few things.</p>
  
  <ol>
  <li>innodb_autoinc_lock_mode=2 (It wont generate consecutive keys)</li>
  <li>UNIQUE_CHECKS=0; (disable unique key checks)</li>
  <li>FOREIGN_KEY_CHECKS=0 (disable foreign key checks)</li>
  <li>--log_bin=OFF turn off binary log used for replication</li>
  </ol>
  
  <h2>Problem</h2>
  
  <p>I want to set first 3 options for just one session i.e. during bulk insert. The first option does not work mysql says unknown system variable 'innodb_autoinc_lock_mode'. I am using MySQL 5.0.4</p>
  
  <p>The last option, I would like to turn it off but I am wondering what if I need replication later will it just start working if I turn it on again?</p>
  
  <h2>Suggestions</h2>
  
  <p>Any other suggestions how to improve bulk inserts/updates for innodb engine? Or please comments on my findings.</p>
  
  <p>Thanks</p>