title: Rebuild index on InnoDB
body: <p>I have Large table with 2 million rows and 50 columns.<br>
  When iam updating/inserting large amount of data  iam dropping all indexes and rebuild them again using 2 queries.  this works fine</p>
  
  <p>But iam thinking to use another query for that
  example :</p>
  
  <pre><code>ALTER TABLE [table_name]  ENGINE = InnoDB
  </code></pre>
  
  <p>as i read from the mysql guide here <a href="http://dev.mysql.com/doc/refman/5.6/en/optimize-table.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.6/en/optimize-table.html</a></p>
  
  <blockquote>
    <p>InnoDB Details</p>
    
    <p>For InnoDB tables, OPTIMIZE TABLE is mapped to ALTER TABLE ... FORCE,
    <strong>which rebuilds the table to update inde</strong>x statistics and free unused
    space in the clustered index. This is displayed in the output of
    OPTIMIZE TABLE when you run it on an InnoDB table</p>
  </blockquote>
  
  <p>Also i think optimize will rebuild the index?</p>
  
  <pre><code> OPTIMIZE TABLE [table_name] 
  </code></pre>
  
  <p>what do you recommend,  my table have more then 2 million rows and 50 columns</p>