MySQL Forums
Forum List  »  InnoDB

Re: alter multiple tables
Posted by: Rick James
Date: February 13, 2013 07:40PM

First, combine the 4 alters into a single ALTER. (That will run more than 4 times as fast.)

I doubt if a Stored Procedure will let you concat, prepare, and execute an ALTER statement. Even it it did, it would be clumsy to feed in more than one table name at a time.

An alternative is to write a program (in whatever language) to print out the ALTER statements; then copy&paste them into the mysql commandline tool.

It looks like you are moving from MyISAM to InnoDB? Some tips:
http://mysql.rjweb.org/doc.php/myisam2innodb

Options: ReplyQuote


Subject
Views
Written By
Posted
13906
February 12, 2013 06:02AM
Re: alter multiple tables
4015
February 13, 2013 07:40PM
2915
February 14, 2013 02:23AM
2999
February 14, 2013 10:02PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.