MySQL Storage Engine Architecture


Indicates that an engine is available

mysql> SHOW ENGINES\G

Table 13.1. Storage Engine Features
FeatureMyISAMMemoryInnoDBArchiveNDB
Storage limits256TBRAM64TBNone384EB
TransactionsNoNoYesNoYes
Locking granularityTableTableRowRowRow
MVCCNoNoYesNoNo
Geospatial data type supportYesNoYesYesYes
Geospatial indexing supportYesNoNoNoNo
B-tree indexesYesYesYesNoYes
Hash indexesNoYesNoNoYes
Full-text search indexesYesNoNoNoNo
Clustered indexesNoNoYesNoNo
Data cachesNoN/AYesNoYes
Index cachesYesN/AYesNoYes
Compressed dataYes[a]NoYes[b]YesNo
Encrypted data[c]YesYesYesYesYes
Cluster database supportNoNoNoNoYes
Replication support[d]YesYesYesYesYes
Foreign key supportNoNoYesNoNo
Backup / point-in-time recovery[e]YesYesYesYesYes
Query cache supportYesYesYesYesYes
Update statistics for data dictionaryYesYesYesYesYes
[a] Compressed MyISAM tables are supported only when using the compressed row format. Tables using the compressed row format with MyISAM are read only. [b] Compressed InnoDB tables require the InnoDB Barracuda file format. [c] Implemented in the server (via encryption functions),rather than in the storage engine. [d] Implemented in the server, rather than in the storage product
The main difference between MyISAM and INNODB are :
  • MyISAM does not support transactions by tables while InnoDB supports.
  • There are no possibility of row-level locking, relational integrity in MyISAM but with InnoDB this is possible. MyISAM has table-level locking.
  • InnoDB does not support FULLTEXT index while MyISAM supports.
  • Performance speed of MyISAM table is much higher as compared with tables in InnoDB.
  • InnoDB is better option while you are dealing with larger database because it supports transactions, volume while MyISAM is suitable for small project.
  • As InnoDB supports row-level locking which means inserting and updating is much faster as compared with MyISAM.
  • InnoDB supports ACID (Atomicity, Consistency, Isolation and Durability) property while MyISAM does not support.
  • In InnoDB table,AUTO_INCREMENT field is a part of index.
  • Once table in InnoDB is deleted then it can not re-establish.
  • InnoDB does not save data as table level so while implementation of select count(*) from table will again scan the whole table to calculate the number of rows while MyISAM save data as table level so you can easily read out the saved row number.
  • MyISAM does not support FOREIGN-KEY referential-integrity constraints while InnoDB supports.

Comments

Popular posts from this blog

Redshift Architecture