MySQL advanced technology-storage engine, mysql storage engine

Source: Internet
Author: User
Tags table definition

MySQL advanced technology-storage engine, mysql storage engine

The MySQL function is divided into two parts. The outer part is mainly used to connect to the client and investigate SQL statements beforehand. The inner part is the so-called storage engine part, it is responsible for receiving external data operation instructions to complete actual data input and output and file operations



What is the MySQL storage engine?

MySQL has multiple storage engines. Each storage engine has its own advantages and disadvantages. You can select the preferred one:

MyISAM, InnoDB, MERGE, MEMORY (HEAP), BDB (BerkeleyDB), EXAMPLE, FEDERATED, ARCHIVE, CSV, and BLACKHOLE.

MySQL supports several storage engines as processors for different table types. The MySQL storage engine includes the engine for processing transaction security tables and the engine for processing non-transaction security tables:

· MyISAM manages non-transaction tables. It provides high-speed storage and retrieval, as well as full-text search capabilities. MyISAM is supported in all MySQL configurations. It is the default storage engine, unless you configure MySQL to use another engine by default.

· The MEMORY storage engine provides "in-MEMORY" tables. The MERGE storage engine allows a set to process the same MyISAM table as a separate table. Like MyISAM, MEMORY and MERGE storage engines process non-transaction tables. Both engines are included in MySQL by default.

Note: The MEMORY storage engine is officially identified as the HEAP engine.

· InnoDB and BDB storage engines provide transaction security tables. BDB is included in the MySQL-Max binary distribution version released for the operating system that supports it. InnoDB is also included in all MySQL 5.1 binary distributions by default. You can configure MySQL to allow or disable any engine as you like.

· The EXAMPLE storage engine is a "stub" engine, which does not do anything. You can use this engine to create tables, but no data is stored or retrieved from them. The purpose of this engine is to provide a service. In the MySQL source code example, it demonstrates how to start writing a new storage engine. Similarly, it is mainly interested in developers.

· NDB Cluster is a storage engine used by MySQL Cluster to split tables into multiple computers. It is provided in MySQL-Max 5.1 binary distribution. Currently, this storage engine is only supported by Linux, Solaris, and Mac OS X. In the future MySQL distribution version, we want to add support for this engine from other platforms, including Windows.

· The ARCHIVE storage engine is used to cover a large amount of data stored without indexing.

· The CSV storage engine stores data in text files in comma-separated formats.

· The BLACKHOLE storage engine accepts but does not store data, and retrieval always returns an empty set.

· FEDERATED storage engine stores data in a remote database. In MySQL 5.1, it only works with MySQL and uses the MySQL C Client API. In future distributions, we want to connect it to another data source using another drive or client connection method.

MyISAM and InnoBD are commonly used.

What are the differences between the three storage engines of Mysql databases?

This is a matter of consideration for performance, as well as transaction support. You will know about Baidu.

MyISAM, InnoDB, Heap (Memory), NDB

Generally, InnoDB is used,

Mysql storage engines include MyISAM, InnoDB, BDB, MEMORY, MERGE, EXAMPLE, NDBCluster, ARCHIVE, CSV, BLACKHOLE, and FEDERATED. InnoDB and BDB provide transaction security tables, other storage engines are non-transaction security tables.
The two most commonly used storage engines:
1. Myisam is the default storage engine of Mysql. When create creates a new table without specifying the storage engine for the new table, Myisam is used by default. Each MyISAM is stored as three files on the disk. The file names are the same as the table names. The extensions are. frm (storage table definition),. MYD (MYData, storage data), and. MYI (MYIndex, storage index ). Data Files and index files can be placed in different directories, and I/O is evenly distributed for faster speed.
2. the InnoDB Storage engine provides transaction security with commit, rollback, and crash recovery capabilities. However, compared with the storage engine of Myisam, InnoDB writes less efficiently and occupies more disk space to retain data and indexes.

I don't know if it is helpful to you.

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.