Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the role of the storage engine in the MySQL database

2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail what the role of the storage engine in the MySQL database is, and the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

What are the functions of various storage engines in MySQL database

MySQL supports several storage engines as processors for different types of tables. The MySQL storage engine includes an engine that processes transactional security tables and an engine that processes non-transactional security tables:

MyISAM manages non-transactional tables. It provides high-speed storage and retrieval, as well as full-text search capabilities. MyISAM is supported in all MySQL configurations and 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 collections to process the same MyISAM table as a separate table. Just like MyISAM, the MEMORY and MERGE storage engines handle non-transactional tables, and both engines are included in MySQL by default.

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

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

The EXAMPLE storage engine is a "stub" engine that does nothing. You can use this engine to create tables, but no data is stored or retrieved from it. The purpose of this engine is to serve as an example in the MySQL source code that demonstrates how to start writing a new storage engine. Again, its main interest is for developers.

NDBCluster is a storage engine used by MySQLCluster to implement tables split into multiple computers. It is available in the MySQL-Max5.1 binary distribution. This storage engine is currently only supported by Linux,Solaris, and MacOSX. In future MySQL distributions, we want to add support for this engine on other platforms, including Windows.

The ARCHIVE storage engine is used to cover large amounts of stored data indexed and very small.

The CSV storage engine stores the data in the article in a comma-separated format.

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

The FEDERATED storage engine stores data in a remote database. In MySQL5.1, it only works with MySQL and uses MySQLCClientAPI. In future distributions, we want it to connect to another data source using a different drive or client connection method.

When you create a new table, you can tell MySQL what type of table you want to create by adding an ENGINE or TYPE option to the CREATETABLE statement:

CREATETABLEt (iINT) ENGINE=INNODB;CREATETABLEt (iINT) TYPE=MEMORY

Although TYPE is still supported in MySQL5.1, ENGINE is now the preferred term.

How to choose the storage engine that works best for you?

The following storage engines are the most commonly used:

MyISAM: the default MySQL plug-in storage engine, which is one of the most commonly used storage engines in Web, data warehousing, and other application environments. Note that you can easily change the default storage engine of the MySQL server by changing the STORAGE_ENGINE configuration variable.

InnoDB: for transactional applications, with many features, including ACID transaction support.

BDB: a transaction engine that replaces InnoDB and supports COMMIT, ROLLBACK, and other transaction features.

Memory: saves all data in RAM, providing extremely fast access in environments where references and other similar data need to be found quickly.

Merge: allows MySQLDBA or developers to logically group a series of equivalent MyISAM tables together and reference them as one object. Ideal for VLDB environments such as data warehousing.

Archive: provides the perfect solution for the storage and retrieval of a large number of rarely referenced historical, archiving, or security audit information.

Federated: the ability to link multiple separate MySQL servers to create a logical database from multiple physical servers. Ideal for distributed or data Mart environments.

Cluster/NDB:MySQL 's clustered database engine is especially suitable for applications with high-performance lookup requirements, which also require the highest uptime and availability.

Other: other storage engines include CSV, which refers to files used as database tables separated by commas, Blackhole, which temporarily prohibits application input to the database, and the Example engine, which helps to quickly create custom plug-in storage engines.

About what the role of the storage engine in the MySQL database is shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report