Mysql table Seven types of detailed introduction _mysql

Source: Internet
Author: User
Learn MySQL database, MySQL table types are what you need to know, the following for you to introduce seven types of MySQL table, I hope you can learn the MySQL table type Help.

MySQL has been in vogue for a long time as the most popular free database service engine of the day, but there may be some people who are not familiar with MySQL's internal environment, especially those that deal with concurrency. Today, let's take a look at the MySQL table types, and some of their simple properties.

So far, MySQL has provided users with a total of 7 types of MySQL tables including DBD, HEAP, ISAM, MERGE, Myias, InnoDB and Gemeni. Among them, dbd and InnoDB belong to the Transaction Security class table, while others belong to the transaction unsafe class table.

DBD
The Berkeley DB (DBD) table is a table that supports transaction processing, developed by the Sleepycat software company. It provides a long awaited feature 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 executed successfully or rolled back.

HEAP
The heap table is the fastest Access data 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 versions of MySQL 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 3.23.25. A merge table is actually a collection of MyISAM tables, merged into a table, mainly for efficiency reasons, because it can not only improve speed, search efficiency, repair efficiency and also save disk space.

myiasm
Myiasm based on the IASM code, it should be said to be iasm derivative, but added a lot of useful extensions. It is the default data table type for MySQL, based on the traditional ISAM type, ISAM is the abbreviation for indexed sequential access method (indexed sequential access), which is generally the standard way to store records and files. Compared with 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 a transaction rollback would cause an incomplete rollback, it would not have 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 datasheet 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 is a much richer feature than BDB, so it is recommended if you need a transaction-safe storage engine. If your data performs a large number of inserts or updates, you should also use InnoDB tables for performance reasons. For INNODB types of tables that support transactions, the main reason for the impact speed is that the AUTOCOMMIT default setting is open, and the program does not explicitly call begin transactions, causing each insert to be automatically committed, seriously affecting the speed. You can call begin before executing SQL, and multiple SQL forms one thing (even if the autocommit is open), which can greatly improve performance.

Gemeni
Gemeni table, it is also heard that the MySQL 4.0 after the launch, but up to now, very few of its introduction, the same application is less, we do not introduce.

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

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.