MySQL's storage engine contrast

Source: Internet
Author: User
Tags table definition table name

In a previous article on MySQL architecture, it was mentioned that MySQL's biggest feature is its pluggable plug-in storage engine, which contrasts several major storage engines. In particular, MySQL is open source, so if you're not satisfied with some of the storage engines, you can modify or write a storage engine to increase the features you want, which is one of the advantages of MySQL as an open source database.

The following table shows the characteristics of the various storage engines:

Two of the most common storage engines are MyISAM and InnoDB

When you first contact MySQL may be a little surprised that there is no support for transaction storage engine, the study of relational database theory, people know that transactions are the core of relational databases. But in real-world applications (especially the Internet), in order to improve performance, it is possible to discard transactions in certain scenarios. Here are a few of the storage engines:

MyISAM Storage Engine

MyISAM is the MySQL official provides the default storage engine, its characteristic is does not support the transaction, the table lock and the Full-text index, for some OLAP system, the operation speed is fast.

Each myisam is stored on disk as three files. The file name is the same as the table name, and the extension is. frm (storage table definition),. MyD (MYData, storing data),. Myi (myindex, storage index). The special note here is that MyISAM does not cache data files, only the index files.

InnoDB Storage Engine

The InnoDB storage engine supports transactions, primarily for OLTP applications, characterized by row-lock settings, support for foreign keys, and support for unlocked reads like Oracle, which means that no locks are generated by default. InnoDB places data in a logical tablespace (similar to Oracle). InnoDB through multiple versioning concurrency control to achieve high concurrency, the ANSI standard of 4 isolation levels, the default is repeatable, using a strategy called Next-key locking to avoid phantom reading.

For storage of data in a table, InnoDB is stored in a way that is similar to an Oracle Index organization table clustered.

The InnoDB storage engine provides transaction security with commit, rollback, and crash recovery capabilities. However, compared to the MyISAM storage engine, InnoDB writes less efficiently and consumes more disk space to preserve data and indexes.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.