myisam to innodb

One thing that sucks really bad with MyISAM is table level locking which can cause some serious issues at times when INSERT/UPDATE/DELETE load is very high. If you are experiencing problems in your application associated with locking, try converting your tables to InnoDB.

I was asked today a question as to how one can convert a MyISAMtable to InnoDB. I will blog about it in detail later but for right now here’s one way:

-ALTER TABLE table_name ENGINE = InnoDB;

and here’s another way:

– dump the table to a SQL file
– change table type from MyISAM to InnoDB in the dumped file
– disable keys (to speed up the process)
– SET AUTOCOMMIT to 0 (for speeding up the process)
– load the table
– SET AUTOCOMMIT to 1
– enable keys (the index is rebuilt at this point)

One is preferred over the other based on various factors such as time limit in which the conversion must be done.

these article is from : http://mysqldatabaseadministration.blogspot.com/2006/07/myisam-to-innodb.html

Satu pemikiran pada “myisam to innodb

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s