mysql myISAM vs Innodb storage engines


InnoDB and MYISAM, are storage engines for MySQL.
These two differ on their locking implementation: InnoDB locks the particular row in the table, and MyISAM locks the entire MySQL table.
You can specify the type by giving MYISAM OR InnoDB while creating a table in DB.
The major deficiency of MyISAM is the absence of transactions support. Versions of MySQL 5.5 and greater have switched to the InnoDB engine to ensure referential integrity constraints, and higher concurrency.

MyISAMInnodb
Not ACID-compliant and non-transactionalACID-compliant and hence fully transactional with ROLLBACK and COMMIT and support for Foreign Keys
MySQL 5.0 default engineRackspace Cloud default engine
Offers compressionOffers compression
Requires full repair and rebuild of indexes and tablesProvides automatic recovery from crashes via the replay of logs
Changed database pages written to disk instantlyDirty pages converted from random to sequential before commit and flush to disk
No ordering in storage of dataRow data stored in pages in PK order
Table-level lockingRow-level locking

When MyISAM tables are mostly useful

There can be several other reasons that fit your requirement for choosing the MyISAM engine. For example, reads can be faster on MyISAM, despite the general claims in the MySQL documentation, when a MyISAM table has a fixed (not dynamic) row size, for example, when it uses more CHARs then VARCHARs. Another reason why you might choose MyISAM over Innodb is because Innodb must perform additional checks because of ACID compliancy. For example, a FK check must be performed, which could potentially cause an operational overhead.

Comments

Popular posts from this blog

HAproxy logging

tomcat catalina coyote jasper cluster

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all