Monday, November 14, 2016

Decrease time required for changing database engine from MYISAM to innoDB (Mysql)

Tags



So you meet this situation where you wish to change your database engine from MYISAM to INNODB but it requires a significant amount of time with large database? This tip will definitely help you.

So instead of just directly change the engine from MYISAM to INNODB from the interface, you should create an empty table with the column and indexes (if you have). After that, use the query below.

INSERT INTO `table_name`(fields_that_you_want) SELECT `fields_that_you_want` FROM `table_name`

By doing this, you will save a lot of time for inserting as mysql does not need to recalculate the index.

This will be very helpful if you have a large database!

If you liked this post, please share it! And do comment if you have better alternatives!


EmoticonEmoticon