InnoDB and MyISAM storage engines Comparative

Original article: blog.ouyangsihai.cn >> InnoDB and MyISAM storage engines compare

InnoDB storage engine introduced

Mysql InnoDB engine is the default storage engine, he has a lot of its own characteristics, enumerated below.

  • It supports transactions , InnoDB storage engine is intended primarily for online transaction processing (OLTP) applications and design.
  • Row lock design , support for foreign keys, unlocked read.
  • It supports multi-version concurrency control (MVCC) to achieve high concurrency.
  • Providing an insertion buffer, writing the second, adaptive hash index, pre-reading and other high-performance and high availability features.

Above those considered some of the features of the InnoDB storage engine, but also its advantages, why InnoDB engine so widely used is because it has good performance.

MyISAM storage engine introduced

  • Does not support transactions , its design goal is to apply for online analysis (OLAP).
  • Support for full-text indexing.
  • Table lock design .
  • It is only the buffer pool buffer index file , without buffering the data file , the table of MyISAM storage engine MYDand MYI, the former storing data files, index files are stored latter.

Comparison between the storage engine

This part, a brief introduction about the differences between the various storage engines, and the main role and characteristics.

Features Comparison

characteristic MyISAM InnoDB BDB Memory Archive NDB
Storage Limits no 64TB no Have no Have
Affairs stand by stand by
Lock level Table lock Row lock page table Row Row
MVCC (concurrency control) stand by stand by stand by
Full-text index stand by
Clustered index stand by
Data and index buffer cache stand by stand by stand by
data compression stand by stand by
Bulk insert speed high low high high High high
Cluster Database Support stand by
Foreign key support stand by
Applicable scene Operations do not require transaction; insert, update less, frequently read; frequent statistical calculations. The operation requires a transaction; update data requires the use of row-level locking; large amount of data read and write; large-scale Internet applications. Similar InnoDB The amount of data that needs to be frequently accessed, and data loss does not produce more serious impact on the business. For data archiving storage engine substantially as log table Clusters

Storage Engine features introduced

Storage Engine main feature
BDB Alternative InnoDB transaction engine that supports COMMIT, ROLLBACK, and other business characteristics
Memory Data stored in memory, restart or crash, data disappears, use hash indexes
Archive Select Insert only support and operations support indexing, ideal for storing archived data, target: high-speed insertion and compression
NDB Clustered storage engine, all data in memory, high availability, high-performance cluster system
Federated Do not store data, but point to the table on a remote MySQL database server
Maria The newly developed engine, to replace MyISAM storage engine. Support services and non-transactional cache, index files, line lock, MVCC features

Articles have inappropriate, please correct me, if you like micro-letters to read, you can also concerned about my micro-channel public number : , 好好学javaaccess to quality learning resources.

Guess you like

Origin blog.51cto.com/sihai/2437971