MySQL's Database engine

Source: Internet
Author: User
Tags bulk insert

MySQL has a lot of database engine, the most important is MyISAM, InnoDB, Heap (memory), in addition to BDB, archive data table, CSV, NDB, Federated

InnoDB Advantages:1. support for database transactions, supports four transaction levels (READ UNCOMMITTED, Read committed, Repeatable read, serializable) 2, provides row-level locks (built-in) and foreign keys, the purpose is to deal with a large number of database systems, row-level lock locking is only one transaction in the record, does not lock the data table, so other users can access the operational database, can greatly improve efficiency. In addition, it can identify deadlocks (two or more processes waiting for each other, dead loops), and automatically terminates one of them. 3, you can Crash Recovery, there is a buffers Disadvantages:1. Full-text indexing is not supported。 2. Large space consumption3. do not save table row Count, a full table scan is required to search the number of rows, slower than myiasm. myiasm engine (mysql default)Myiasm is divided into: MyISAM static (data column each has a fixed length, high access efficiency, high security), MyISAM dynamic (high space utilization, custom), MyISAM Compressed (access speed, but modified compressed data) 1, to the database Transaction not supported2, row-level locks and foreign keys are not supported, but support table Lock3. Database read/write separation selection of two engines for InnoDB and MyISAMDifferent engines can be used in different data tables, that is, the two engines can be used in the same database. 1, save space and time to choose MyISAM2, use to the transaction, security higher, need the user to operate the choice InnoDB3, no absolute optimal, concrete situation concrete view 1) Large-size datasets tend to select InnoDB engines because they support transactional processing and failback. The size of the database determines the length of time the recovery takes place, and InnoDB can use the transaction log (binary) for data recovery, which can be relatively fast with the InnoDB engine. primary key cannot be too long2) BULK INSERT use MyISAM fast because it does not support transactions and does not need to be rolled back when there is a problem HeapThe heap data table only exists MemoryThe hash index is used, so the speed of the main use is to act as Temporary Data Sheet(the MySQL service stops running, then disappears) is mainly suitable for small quantity, high access speed

MySQL Database engine

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.