Comparison of MySQL database engines

This is a comparison between notable database engines for the MySQL database management system (DBMS). A database engine (or "storage engine") is the underlying software component that a DBMS uses to create, read, update and delete (CRUD) data from a database.

NameVendorLicenseTransactionalUnder active developmentMySQL versionsMariaDB versions
ArchiveOracleGPLNoYes5.0 - present5.1 - present
AriaMariaDBGPLNoYesNone5.1 - present
Berkeley DBOracleAGPLv3YesNo? - 5.0None
BLACKHOLEOracleGPLNoYes5.0 - present5.1 - present
CONNECTMariaDBGPLNoYesNone10.0 - present
CSVOracleGPLNoYes5.0 - present5.1 - present
FalconOracleGPLYesNo?None
FederatedOracleGPL?No5.0 - present?
FederatedXMariaDBGPLYesNoNone? - present
InfiniDBCalpontGPLYesNoNoneNone
InnoDBOracleGPLYesYes3.23 - present5.1 - present
MEMORYOracleGPLNoYes3.23 - present5.1 - present
MroongaGroonga ProjectGPLNoYesNone10.0 - present
MyISAMOracleGPLNoNo3.23 - present5.1 - present
MyRocksFacebookGPLv2YesYesNone10.2 - present
NDBOracleGPLv2YesYes?None
OQGRAPHOracleGPLv2NoNoNone5.2 - present
S3MariaDBGPLNoYesNone10.5 - present
SEQUENCEMariaDBGPLNoYesNone10.0 - present
SphinxSphinx Technologies Inc.GPLNoNoNone5.2 - present
SPIDERKentoku ShibaGPLYesYesNone10.0 - present
TempTableOracleGPLNoYes8.0 - presentNone
TokuDBPerconaModified GPLYesNoNone5.5 - present
XtraDBPerconaGPLYesYesNone5.1 - 10.1

Comparison between InnoDB and MyISAM

  1. InnoDB recovers from a crash or other unexpected shutdown by replaying its logs. MyISAM must fully scan and repair or rebuild any indexes or possibly tables which had been updated but not fully flushed to disk. Since the InnoDB approach is approximately fixed time while the MyISAM time grows with the size of the data files, InnoDB offers greater availability as database sizes grow.
  2. InnoDB, with innodb_flush_log_at_trx_commit set to 1, flushes the transaction log after each transaction, greatly improving reliability.[1] MyISAM has to be run on top of a fully journaled filesystem, such as ext4 mounted with data=journal, to provide the same resilience against data file corruption. (The journal can be put on an SSD device for improved MyISAM performance, similarly, the InnoDB log can be placed on a non-journaled filesystem such as ext2 running on an SSD for a similar performance boost. Reliability is not sacrificed in either case.)
  3. InnoDB can be run in a mode where it has lower reliability but in some cases higher performance. Setting innodb_flush_log_at_trx_commit to 0 switches to a mode where transactions are not committed to disk before control is returned to the caller. Instead, disk flushes happen on a timer.[1]
  4. InnoDB automatically groups together multiple concurrent inserts and flushes them to disk at the same time.[2] MyISAM relies on the filesystem block cache for caching reads to the data rows and indexes, while InnoDB does this within the engine itself, combining the row caches with the index caches.[3]
  5. InnoDB will store rows in primary key order if present, else first unique key order. This can be significantly faster if the key is chosen to be good for common operations. If there is no primary key or unique key InnoDB will use an internally generated unique integer key and will physically store records in roughly insert order, as MyISAM does. Alternatively, an autoincrementing primary key field can be used to achieve the same effect.
  6. InnoDB provides updatable LZW compressed page storage for both data and indexes. MyISAM compressed tables can't be updated.[4]
  7. When operating in fully ACID-compliant modes, InnoDB must do a flush to disk at least once per transaction, though it will combine flushes for inserts from multiple connections. For typical hard drives or arrays, this will impose a limit of about 200 update transactions per second. For applications which require higher transaction rates, disk controllers with write caching and battery backup will be required in order to maintain transactional integrity. InnoDB also offers several modes which reduce this effect, naturally leading to a loss of transactional integrity guarantees, though still retaining greater reliability than MyISAM. MyISAM has none of this overhead, but only because it does not support transactions.
  8. MyISAM uses table-level locking on updates and deletes to any existing row, with an option to append new rows instead of taking a lock and inserting them into free space. InnoDB uses row-level locking. For large database applications where many rows are often updated, row-level locking is crucial because a single table-level lock significantly reduces concurrency in the database.
  9. Both InnoDB and MyISAM support full-text search, with InnoDB gaining full-text index support in MySQL 5.6.4,[5] but the results can be notably different.[6]

References

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.