Home Database Mysql Tutorial What is the default engine of mysql

What is the default engine of mysql

Jun 14, 2022 pm 05:15 PM
mysql

Before MySQL5.5, the default engine was "MyISAM"; starting from MySQL5.5, the default engine is "InnoDB". This engine fully supports ACID compliance and transactions, and supports foreign keys, commit, rollback, For rollforward operations, the table size can be up to 64TB. In MySQL, you can use the "SHOW ENGINES;" command to view the engine types and default engines supported by the system; in the output results, the engine identified by the DEFAULT keyword is the current default storage engine.

What is the default engine of mysql

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.

MySQL provides various storage engines for its tables, such as InnoDB, MyISAM, Memory, Merge, Archive, CSV, BLACKHOLE, etc.

Prior to MySQL 5.5, MyISAM was the default storage engine when you created a table without explicitly specifying a storage engine. Starting with version 5.5, MySQL uses InnoDB as the default storage engine.

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 the default engine of mysql

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.

It can be seen that the current default storage engine is InnoDB.

MyISAM Engine

MyISAM extends the previous ISAM storage engine. MyISAM tables are optimized for compression and speed. MyISAM tables are also portable between platforms and operating systems.

The size of MyISAM tables can reach 256TB, which is huge. Additionally, MyISAM tables can be compressed into read-only tables to save space. On startup, MySQL checks MyISAM tables for corruption and even repairs them if errors occur. MyISAM tables are not transaction safe.

InnoDB Engine

InnoDB tables fully support ACID compliance and transactions. They are also the best choice for performance. InnoDB tables support foreign key, commit, rollback, and rollforward operations. InnoDB tables can be up to 64TB in size.

Like MyISAM, InnoDB tables are portable between different platforms and operating systems. If necessary, MySQL also checks and repairs InnoDB tables on startup.

MERGE Engine

The MERGE table is a virtual table that combines multiple MyISAM tables that have features similar to one table Structure. The MERGE storage engine is also called the MRG_MyISAM engine. The MERGE table does not have its own index; it uses the index of the component table.

Using MERGE tables can speed up performance when joining multiple tables. MySQL only allows you to perform SELECT, DELETE, UPDATE and INSERT operations on MERGE tables. If DROP TABLE uses the MERGE statement on the MERGE table, only the specification is deleted. The underlying tables are not affected.

Memory Engine

Memory tables are stored in memory and use hash indexes, so they are faster than MyISAM tables. The life cycle of in-memory table data depends on the uptime of the database server. The in-memory storage engine was formerly known as HEAP.

Archive Engine

The Archive Storage Engine allows you to store large numbers of records (for archiving) in a compressed format to save disk space. The archive storage engine compresses records when inserting and uses the zlib library to decompress them when reading.

Archive tables only allow INSERT and SELECT statements. ARCHIVE tables do not support indexes, so a full table scan is required to read rows from the table.

CSV

The CSV storage engine stores data in the Comma Separated Values ​​(CSV) file format. CSV tables provide a convenient way to migrate data to non-SQL applications such as spreadsheet software.

CSV tables do not support the NULL data type. Additionally, read operations require a full table scan.

FEDERATED

FEDERATED storage engine allows you to manage data from remote MySQL servers without using clustering or replication technology. Local union tables do not store any data. When you query data from a local federated table, the data is automatically extracted from the remote federated table.

[Related recommendations: mysql video tutorial]

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

Statement of this Website
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MySQL's Role: Databases in Web Applications MySQL's Role: Databases in Web Applications Apr 17, 2025 am 12:23 AM

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

Laravel Introduction Example Laravel Introduction Example Apr 18, 2025 pm 12:45 PM

Laravel is a PHP framework for easy building of web applications. It provides a range of powerful features including: Installation: Install the Laravel CLI globally with Composer and create applications in the project directory. Routing: Define the relationship between the URL and the handler in routes/web.php. View: Create a view in resources/views to render the application's interface. Database Integration: Provides out-of-the-box integration with databases such as MySQL and uses migration to create and modify tables. Model and Controller: The model represents the database entity and the controller processes HTTP requests.

How to start mysql by docker How to start mysql by docker Apr 15, 2025 pm 12:09 PM

The process of starting MySQL in Docker consists of the following steps: Pull the MySQL image to create and start the container, set the root user password, and map the port verification connection Create the database and the user grants all permissions to the database

Solve database connection problem: a practical case of using minii/db library Solve database connection problem: a practical case of using minii/db library Apr 18, 2025 am 07:09 AM

I encountered a tricky problem when developing a small application: the need to quickly integrate a lightweight database operation library. After trying multiple libraries, I found that they either have too much functionality or are not very compatible. Eventually, I found minii/db, a simplified version based on Yii2 that solved my problem perfectly.

How to install mysql in centos7 How to install mysql in centos7 Apr 14, 2025 pm 08:30 PM

The key to installing MySQL elegantly is to add the official MySQL repository. The specific steps are as follows: Download the MySQL official GPG key to prevent phishing attacks. Add MySQL repository file: rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm Update yum repository cache: yum update installation MySQL: yum install mysql-server startup MySQL service: systemctl start mysqld set up booting

Centos install mysql Centos install mysql Apr 14, 2025 pm 08:09 PM

Installing MySQL on CentOS involves the following steps: Adding the appropriate MySQL yum source. Execute the yum install mysql-server command to install the MySQL server. Use the mysql_secure_installation command to make security settings, such as setting the root user password. Customize the MySQL configuration file as needed. Tune MySQL parameters and optimize databases for performance.

Laravel framework installation method Laravel framework installation method Apr 18, 2025 pm 12:54 PM

Article summary: This article provides detailed step-by-step instructions to guide readers on how to easily install the Laravel framework. Laravel is a powerful PHP framework that speeds up the development process of web applications. This tutorial covers the installation process from system requirements to configuring databases and setting up routing. By following these steps, readers can quickly and efficiently lay a solid foundation for their Laravel project.

MySQL and phpMyAdmin: Core Features and Functions MySQL and phpMyAdmin: Core Features and Functions Apr 22, 2025 am 12:12 AM

MySQL and phpMyAdmin are powerful database management tools. 1) MySQL is used to create databases and tables, and to execute DML and SQL queries. 2) phpMyAdmin provides an intuitive interface for database management, table structure management, data operations and user permission management.

See all articles