Home  >  Article  >  Database  >  What is mysql storage engine

What is mysql storage engine

青灯夜游
青灯夜游Original
2022-02-17 15:44:404323browse

In mysql, the storage engine is the underlying software component of the database. Simply put, it refers to the type of table, which determines how the table is stored in the computer. Different storage engines provide different storage mechanisms, indexing techniques, locking levels and other functions. Using different storage engines, you can also obtain specific functions.

What is mysql storage engine

The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.

The database storage engine is the underlying software component of the database. The database management system uses the data engine to create, query, update and delete data operations. In short, the storage engine refers to the type of table.

The storage engine of the database determines how the table is stored in the computer. Different storage engines provide different storage mechanisms, indexing techniques, locking levels and other functions. Using different storage engines, you can also obtain specific functions.

In MySQL, the storage engine runs as a plug-in. MySQL provides several different storage engines, including engines for processing transaction-safe tables and engines for processing non-transaction-safe tables. In MySQL, there is no need to use the same storage engine in the entire server. According to specific requirements, different storage engines can be used for each table.

MySQL 5.7 supports storage engines such as InnoDB, MyISAM, Memory, Merge, Archive, CSV, BLACKHOLE, etc. You can use the SHOW ENGINES; statement to view the engine types supported by the system. The result is as shown in the figure.

What is mysql storage engine

The value of the Support column indicates whether a certain engine can be used. YES means it can be used, NO means it cannot be used, and DEFAULT means that the engine is the current default storage engine.

The following is a brief description of several storage engines, and several of them (mainly InnoDB and MyISAM) will be explained in detail later. Things like NDB require more extensive discussion and are beyond the scope of this tutorial, so we won't cover them much later in the tutorial.

Table 1 MySQL storage engine
Storage engine Description
ARCHIVE The engine used for data archiving. Once the data is inserted, it cannot be modified and does not support indexing.
CSV When storing data, commas will be used as the separator between data items.
BLACKHOLE will discard the write operation and return empty content.
FEDERATED Stores data in a remote database and is a storage engine used to access remote tables.
InnoDB Transaction processing engine with foreign key support
MEMORY Place in memory The table
MERGE is used to manage a table collection composed of multiple MyISAM tables
MyISAM Main non-transaction storage engine
NDB MySQL cluster dedicated storage engine

How many are there? The names of each storage engine also have synonyms. For example, MRG_MyISAM and NDBCLUSTER are synonyms of MERGE and NDB respectively. The storage engines MEMORY and InnoDB were called HEAP and Innobase respectively in the early days. Although the latter two names are still recognized, they have been abandoned.

[Related recommendations: mysql video tutorial]

The above is the detailed content of What is mysql storage engine. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn