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

The difference between JS pre-parsing and variable promotion in web interview

Table of contents What is pre-analysis? The diffe...

Detailed explanation of MySQL 8.0 password expiration policy

Starting from MySQL 8.0.16, you can set a passwor...

Analysis of the principle and usage of MySQL continuous aggregation

This article uses examples to illustrate the prin...

Tips for using top command in Linux

First, let me introduce the meaning of some field...

Detailed explanation of MYSQL log and backup and restore issues

This article shares MYSQL logs and backup and res...

Detailed explanation of commonly used CSS styles (layout)

Compatible with new CSS3 properties In CSS3, we c...

js native carousel plug-in production

This article shares the specific code for the js ...

Introduction to Computed Properties in Vue

Table of contents 1. What is a calculated propert...

Solve the error "Can't locate ExtUtils/MakeMaker.pm in @INC"

When installing mha4mysql, the steps are roughly:...

What does input type mean and how to limit input

Common methods for limiting input 1. To cancel the...

Tutorial on how to modify element.style inline styles

Preface When we were writing the web page style a...

Navicat connects to MySQL8.0.11 and an error 2059 occurs

mistake The following error occurs when connectin...

Reasons why MySQL kill cannot kill threads

Table of contents background Problem Description ...

JavaScript Basics Operators

Table of contents 1. Operators Summarize 1. Opera...