MySQL MyISAM default storage engine implementation principle

MySQL MyISAM default storage engine implementation principle

By default, the MyISAM table will generate three files on the disk: .frm (table structure file), .MYD (data file), and .MYI (index file)

You can specify the storage location of data files and index files when creating them. Only MyISAM tables support this:

  • DATA DIRECTORY [=] The absolute path where the data is saved
  • INDEX DIRECTORY [=] Absolute path to the index file

The maximum amount of data supported by a single MyISAM table is 2 to the 64th power of jump records

A maximum of 64 indexes can be created for each table.

If it is a composite index, each composite index contains a maximum of 16 columns, and the maximum length of the index value is 1000B

The storage format of the MyISAM engine is:

  • Fixed length (FIXED static): refers to the field not containing VARCHAR/TEXT/BLOB
  • Dynamic: As long as the field contains VARCHAR/TEXT/BLOB
  • COMPRESSED: muisampack created

InnoDB storage engine:

The design follows the ACID model, supports transactions, has the ability to recover from service crashes, and can protect user data to the greatest extent possible.

Support row-level locks, which can improve the read and write performance of multiple users concurrently

InnoDB has its own independent buffer pool, and commonly used data and indexes are cached.

For INSERT, UPDATE, and DELETE operations, InnoDB uses a change buffering mechanism to automatically optimize, provide consistent reads, and cache changed data to reduce disk I/O and improve performance.

After creating an InnoDB table, two files will be generated:

  • .frm table structure file
  • .ibd data and index storage tablespace

All tables need to create a primary key, preferably with AUTO_INCREMENT, or put it in a frequently queried column as the primary key

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Summary of the differences between MySQL storage engines MyISAM and InnoDB
  • Detailed explanation of the difference between MyISAM and InnoDB in MySQL storage engine
  • Introduction to MySQL storage engine and the difference between MyISAM and InnoDB
  • The difference between MySQL storage engines InnoDB and MyISAM
  • Detailed explanation of non-clustered indexes in MySQL's MyISAM storage engine

<<:  The problem and solution of using docker storage and causing Exit to cause files to fail to upload to the server

>>:  Super detailed basic JavaScript syntax rules

Recommend

MySQL transaction concepts and usage in-depth explanation

Table of contents The concept of affairs The stat...

WeChat applet learning wxs usage tutorial

What is wxs? wxs (WeiXin Script) is a scripting l...

Tutorial on using the hyperlink tag in HTML

The various HTML documents of the website are con...

How to build your own Angular component library with DevUI

Table of contents Preface Creating a component li...

VSCode Development UNI-APP Configuration Tutorial and Plugin

Table of contents Written in front Precautions De...

JavaScript Closures Explained

Table of contents 1. What is a closure? 1.2 Memoi...

Implementing simple chat room dialogue based on websocket

This article shares the specific code for impleme...

In-depth explanation of JavaScript this keyword

Table of contents 1. Introduction 2. Understand t...

Example code for implementing dynamic column filtering in vue+element table

Requirement: When displaying data in a list, ther...

Recommend some useful learning materials for newbies in web design

Many people also asked me what books I read when ...

A simple method to regularly delete expired data records in MySQL

1. After connecting and logging in to MySQL, firs...

This article will show you how JavaScript garbage collection works

Table of contents 1. Overview 2. Memory Managemen...

Use js to write a simple snake game

This article shares the specific code of a simple...

Win2008 R2 mysql 5.5 zip format mysql installation and configuration

Win2008 R2 zip format mysql installation and conf...

How to optimize MySQL deduplication operation to the extreme

Table of contents 1. Clever use of indexes and va...