Comparison of storage engines supported by MySQL database

Comparison of storage engines supported by MySQL database

Storage Engine

MySQL can store data in files (memory) using different techniques, which are called storage engines.
Each storage engine uses different storage mechanisms, indexing techniques, and locking levels, ultimately providing a wide range of different capabilities.

Storage engines supported by MySQL

MyISAM

InnoDB

Memory

CSV

Archive

Concurrency Control

Ensure data consistency and integrity when multiple connections modify records.

Lock

1. Shared lock (read lock): Multiple users can read the same resource in the same time period, and the data will not change during the reading process.
2. Exclusive lock (write lock): Only one user can write to a resource at any time. When a write lock is performed, other read lock or write lock operations will be blocked.

Lock particles

1. Table lock is a lock strategy with the lowest overhead.
2. Row lock is the most expensive lock strategy.

Transactions

Transactions are used to ensure the integrity of the database

insert image description here

Implementation steps:
(1) Subtract 200 yuan from the current account (account balance is greater than or equal to 200).
(2) Add RMB 200 to the other party’s account.

Foreign Keys

It is a strategy to ensure data consistency.

index

It is a structure for sorting the values ​​of one or more columns in a data table.

Features of various storage engines

Memory: Data is stored in memory, and the storage limit is limited by the memory size.
MyISAM: Suitable for situations where there are not many transactions.
InnoDB: Suitable for situations where there are many transactions and foreign key support is required.
Index: normal index, unique index, full-text index, btree index, hash index.

insert image description here

MyISAM: The storage limit can reach 256TB, and it supports indexing, table-level locking, and data compression.
InnoDB: The storage limit is 64 TB, supports transactions and indexes, and the lock granularity is row lock.

insert image description here

The above is the detailed comparison of storage engines supported by MySQL database. For more information about MySQL storage engine, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • MySQL table type storage engine selection
  • MySQL data analysis storage engine example explanation
  • Differences and comparisons of storage engines in MySQL
  • Advantages and disadvantages of common MySQL storage engines
  • Let's learn about the MySQL storage engine

<<:  Responsive Web Design Learning (2) — Can videos be made responsive?

>>:  Detailed explanation of commonly used styles in CSS3 [Basic text and font styles]

Recommend

How to start multiple MySQL databases on a Linux host

Today, let’s talk about how to start four MySQL d...

Nodejs error handling process record

This article takes the connection error ECONNREFU...

JavaScript to implement limited time flash sale function

This article shares the specific code of JavaScri...

Vue implements the right slide-out layer animation

This article example shares the specific code of ...

Example of using JS to determine whether an element is an array

Here are the types of data that can be verified l...

Vue two fields joint verification to achieve the password modification function

Table of contents 1. Introduction 2. Solution Imp...

How to write elegant JS code

Table of contents variable Use meaningful and pro...

Implementation of building custom images with Dockerfile

Table of contents Preface Introduction to Dockerf...

Quickly learn MySQL basics

Table of contents Understanding SQL Understanding...

Example of how to build a Harbor public repository with Docker

The previous blog post talked about the Registry ...

MYSQL slow query and log settings and testing

1. Introduction By enabling the slow query log, M...

JavaScript ECharts Usage Explanation

I used ECharts when doing a project before. Today...

Detailed explanation of Vue custom instructions and their use

Table of contents 1. What is a directive? Some co...

How to compile and install PHP and Nginx in Ubuntu environment

This article describes how to compile and install...