List:General Discussion« Previous MessageNext Message »
From:Angela liu Date:December 1 2011 10:16pm
Subject:best way to copy a innodb table
View as plain text  
Hi, folks:


I have a situation:

A large innodb table t1 with 45 million rows, need to have a new table t2 exactly
the same as t1, to copy the data from t1 to t2, I have the following query:

create table t2 like t1;

insert into t2 select * from t1;


but the above insert may run long time , that can interface with performance, is there a
way to chunk the insert into the new table? like breaking it down into chunks of 100,000
rows ?


Thanks
Thread
best way to copy a innodb tableAngela liu1 Dec
  • Re: best way to copy a innodb tableClaudio Nanni1 Dec
    • Re: best way to copy a innodb tableAngela liu1 Dec
  • Re: best way to copy a innodb tableMiguel Angel Nieto1 Dec
    • Re: best way to copy a innodb tablePerrin Harkins2 Jul
  • Re: best way to copy a innodb tableKaren Abgarian2 Dec
  • Re: best way to copy a innodb tableArjun2 Jul
    • Re: best way to copy a innodb tableMichael Dykman2 Jul
    • RE: best way to copy a innodb tableRick James2 Jul