I have posted a parallel question on Stackoverflow (http://stackoverflow.com/questions/8788639/mysql-create-table-like-with-engine-override) as I am not certain where to post this question.
This is a repeat post hoping for some help and advice.
-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x
I am in the process of breaking up a wordpress site with one database and 81,000+ tables (900MB) into a multi-DB using a plugin by wpmudev.org. The main motivator is performance and I checked the tables itself and they are of type MyISAM.
I was thinking that while moving the tables into new databases I could also change the table type to InnoDB which should see a site performance improvement.
The script to migrate tables from the existing db to the new db uses the following syntax:
CREATE TABLE .... LIKE ....
INSERT INTO .... SELECT * FROM ....
I could not locate information if I could oveerride the engine in the CREATE TABLE command such as:
CREATE TABLE .... LIKE .... ENGINE=InnoDB
Also I am wondering if "INSERT INTO .... SELECT * FROM ...." is the most efficient way to insert the data... This is a php script so I don't mind adding a little code to improve the performance which - at an earlier trial took 3 days to run on a 4-core 4GB RAM!
This is a repeat post hoping for some help and advice.
-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x
I am in the process of breaking up a wordpress site with one database and 81,000+ tables (900MB) into a multi-DB using a plugin by wpmudev.org. The main motivator is performance and I checked the tables itself and they are of type MyISAM.
I was thinking that while moving the tables into new databases I could also change the table type to InnoDB which should see a site performance improvement.
The script to migrate tables from the existing db to the new db uses the following syntax:
CREATE TABLE .... LIKE ....
INSERT INTO .... SELECT * FROM ....
I could not locate information if I could oveerride the engine in the CREATE TABLE command such as:
CREATE TABLE .... LIKE .... ENGINE=InnoDB
Also I am wondering if "INSERT INTO .... SELECT * FROM ...." is the most efficient way to insert the data... This is a php script so I don't mind adding a little code to improve the performance which - at an earlier trial took 3 days to run on a 4-core 4GB RAM!