title: Mysql create table based on another table including indexes
body: <p>I need to create a table based on another table in MYsql including the constraints and indices.</p>
  
  <p>I have following scenario:</p>
  
  <p>Table A- exists probably with millions of rows.
  I want to create table B with exactly same as table A (including constraints and indices).
  Process data from A and some other source and insert to B.
  At the end of processing drop table A(drop indices associated with table A) and Rename table B to A including indices.</p>
  
  <p>What is the best way to do this? Performance is my real concern.</p>
  
  <p>Thanks</p>