Comparison between MyISAM and InnoDB

MyISAM: MyISAM is the default storage engine (before Mysql5.1). Each MyISAM is stored in three files on the disk. The name of each file starts with the name of the table, and the extension indicates the file type.

    .frm file storage table definition
    · MYD (MYData) file storage table data
    .MYI (MYIndex) file storage table index

InnoDB: MySQL's default storage engine, providing MySQL with transaction security (transaction), rollback (rollback) and crash recovery capabilities (crash recovery capabilities), multi-version concurrency control (multi-versioned concurrency control) transaction security (transaction- safe (ACID compliant) type table. InnoDB provides row-level locking (locking on row level), which provides non-locking read in SELECTs similar to Oracle.

Compared:

  1. Whether to support row-level locking: MyISAM only has table-level locking, while InnoDB supports row-level locking and table-level locking. The default is row-level locking.
  2. Whether to support safe recovery after transaction and crash: MyISAM emphasizes performance, each query is atomic, its execution speed is faster than InnoDB type, but does not provide transaction support. However, InnoDB provides transactions to support advanced database functions such as transactions and foreign keys. A transaction-safe (ACID compliant) type table with transactions, rollbacks, and crash recovery capabilities.
  3. Whether to support foreign keys: MyISAM does not support, while InnoDB supports.
  4. Whether to support MVCC: Only InnoDB supports. Cope with high concurrent transactions, MVCC is more efficient than simply locking; MVCC only  READ COMMITTED and REPEATABLE

Guess you like

Origin www.cnblogs.com/0error0warning/p/12679681.html