Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL different storage engines for tables

Is it a good practice to set up a database with some InnoDB and some MyISAM tables depending on their use? I would set InnoDB only for those involved in transactions and MyISAM for everything else. Does this have some kind of negative effect or anything to avoid this solution?

like image 738
Rápli András Avatar asked Oct 28 '13 14:10

Rápli András


1 Answers

Use InnoDB for all tables, unless you can prove a compelling performance advantage for using MyISAM, or you need MyISAM's FULLTEXT or GIS indexes.

InnoDB is the default storage engine in MySQL 5.5 and later. InnoDB is crash-safe, and it is being developed actively. And it has better performance than MyISAM in most cases.

MyISAM gets corrupted easily during a crash. It does not save data to disk synchronously (relies on filesystem buffering). It has only table-level locking. It is receiving no development or enhancement, and it's on its way to becoming deprecated.

like image 170
Bill Karwin Avatar answered Oct 17 '22 17:10

Bill Karwin