List:General Discussion« Previous MessageNext Message »
From:Michael Dykman Date:July 2 2013 3:51pm
Subject:Re: best way to copy a innodb table
View as plain text  
Another technique to avoid impact to the source database is to create your
target as MyISAM, pump your records into that (no ACID overhead) and at the
end :

    ALTER mytable engine=InnoDb

The alter can take awhile but it will impose no strain on the source server
at all.


On Tue, Jul 2, 2013 at 3:48 AM, Arjun <nagav@stripped> wrote:

> Well, the easy way to chunk the inserts is by use of limit. Here is what I
> used for one of my projects:
>
> Insert ignore into t1 (f1, f2, f3)
> Select f1, f2, f3 from t2 limit 1000000, 1000000
>
> Inserts 1M records at a time starting from 1M th record in t2 and you can
> keep
> incrementing this offset as you progress. This will help in monitoring the
> table inserts and at the same time move chunks of records from source
> table.
>
> Enjoy!
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql
>
>


-- 
 - michael dykman
 - mdykman@stripped

 May the Source be with you.

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