Bacula-users

Re: [Bacula-users] Migrating from myisam to innodb

2013-03-21 08:47:12
Subject: Re: [Bacula-users] Migrating from myisam to innodb
From: Konstantin Khomoutov <flatworm AT users.sourceforge DOT net>
To: Phil Stracchino <alaric AT metrocast DOT net>
Date: Thu, 21 Mar 2013 16:43:52 +0400
On Thu, 21 Mar 2013 07:40:01 -0400
Phil Stracchino <alaric AT metrocast DOT net> wrote:

[...]
> Try this for a faster method:
> 
> CREATE TABLE NewFile LIKE File;
> INSERT INTO NewFile (SELECT * FROM File);
> DROP TABLE File;
> RENAME TABLE NewFile TO File;

I think the "ALTER TABLE" step is missing, and this should be:

CREATE TABLE NewFile LIKE File;
ALTER TABLE NewFile ENGINE=InnoDb;
INSERT INTO NewFile (SELECT * FROM File);
DROP TABLE File;
RENAME TABLE NewFile TO File;

Thanks for the tip -- used this approach today to reload my own catalog.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users