What are the types of MySQL database tables

Source: Internet
Author: User

Up to now, MySQL has provided users with 7 MySQL table types, including DBD, HEAP, ISAM, MERGE, Myiasm, InnoDB, and Gemeni. where dbd, InnoDB belong to the Transaction Security Class table, and others belong to the transaction non-security class table.

DBD
The Berkeley DB (DBD) table is a table that supports transaction processing and is developed by Sleepycat software company. It provides the long-awaited functionality of MySQL users-transaction control. Transaction control is a valuable feature in any database system because they ensure that a set of commands can be successfully executed or rolled back.

HEAP
The heap table is the fastest data access table in MySQL. This is because they use a hash index stored in dynamic memory, but if MySQL or the server crashes, the memory data will be lost.

ISAM
The ISAM table is the default table type for earlier MySQL versions until Myiasm is developed. It is recommended that you do not use it again.

MERGE
The merge is an interesting new type that appears after the 3.23.25. A merge table is actually another collection of MyISAM tables, a consolidated table, primarily for efficiency reasons, because it will not only improve speed, search efficiency, repair efficiency, but also save disk space.

myiasm
Myiasm is based on the Iasm code, which should be said to be a derivative of iasm, but adds a lot of useful extensions. It is the default data table type for MySQL, based on the traditional ISAM type, ISAM is an abbreviation for indexed sequential access method (indexed sequential access methods), which is generally the standard way to store records and files. Compared to other storage engines, MyISAM has most of the tools for checking and repairing tables. ISAM tables can be compressed, and they support full-text search, but they are transaction insecure and do not support foreign keys. If the transaction rollback will result in incomplete rollback, there is no atomicity. So if you ignore transactions and access concurrency, and you need to execute a large number of select retrieval statements, MyISAM will be the best choice.

InnoDB
InnoDB is a relatively new type of data table that was introduced after MySQL 4.0, which is transaction-safe. It has the same characteristics as the BDB type, and they also support foreign keys. InnoDB table speed quickly has features that are richer than bdb, so it is recommended to use a transaction-safe storage engine. If your data performs a large number of inserts or update, you should also use the InnoDB table for performance reasons. For tables with InnoDB types that support transactions, the main reason for the speed is that the AUTOCOMMIT default setting is open, and the program does not explicitly call begin to start a transaction, causing each insert to be automatically committed, seriously affecting the speed. You can call begin before you execute SQL, and multiple SQL forms a thing (even if the autocommit is open), which will greatly improve performance.

Gemeni
Gemeni table, it is heard that is also launched after the MySQL 4.0, but as of now, there is very little introduction to it, the same application will be less, we do not introduce for the time being.

MySQL has a lot of data table types, the more important of which is the myisam,innodb of these two kinds.
Each of these two types has advantages and disadvantages, need to choose the appropriate according to the actual situation, MySQL support for different tables set different types. Here's a simple comparison:
The MyISAM table type is a fairly mature and stable table type, but MyISAM does not support some features.

What are the types of MySQL database tables

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.