MySQL Storage engine

Source: Internet
Author: User

1. What is a storage engine?
The storage engine refers to the type of the table. The storage type of the database determines how the table is stored on the computer. Users can do this by not
To select the appropriate storage engine with the same storage method, transaction processing, etc.

2. How do I view MySQL's storage engine?
View MySQL-supported storage engines: Show ENGINES
View display supported storage engine information: show VARIABLES like ' have% '
View the default storage engine: Show VARIABLES like ' Storage_engine '

3.MySQL common storage engine and features
In the MySQL database, the most commonly used engines are 2: InnoDB and Myiasm.
InnoDB Storage Engine
Foreign keys are supported.
Support for things, which is the preferred engine when you need to use the database's transactions.
Its design goal is to deal with large data capacity of the database system, providing a commit, rollback and crash recovery capability of transaction security,

Support for transaction processing and failure recovery.
A row-level lock is provided, and the write operation does not lock the full table because of the small granularity of the lock. So the efficiency is obvious in the scenario with high concurrency.

MyISAM Storage Engine
Do not support things, only insert data, read data.
Foreign keys are not supported, and row-level and foreign keys are not supported. Therefore, when you execute the INSERT INSERT and UPDATE statement, you need to lock the table when you perform a write operation. Therefore, the efficiency will be reduced.
The Myiasm engine saves the number of rows in the table, so when the select count (*) From table statement is made, you can directly read the saved values without having to scan the entire table.

The myiasm can be preferred as the database engine if the read operation is much more than the write database, and no transaction support is required.

Memory Storage Engine
Temporary tables, data stored in memory, read fast, low security, with less.

MySQL Storage engine

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.