Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What are the types of storage engines for tables in mysql

Shulou Source: shulou.com Published: 2022-06-02 11:12:30 10月20日 Update

Mysql table storage engine types, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

Type of table storage engine:

MyISAM structure:

.frm file: storing table data definition, table structure

.MYD files: storing table data rows

.MYI file: stores the index of the table, stored in b+tree

MyISAM storage engine structure:

According to col=49, quickly locate to 49 according to b+tree, get the values 0X90, and then get the table data.

InnoDB structured Storage engine: primary key is required. Why?

.ibd files: index files and data row merging

The difference between MyISAM and InnoDB:

MyISAM: pointer to the disk where the index is located

InnoDB: storage of other fields in the row of the index

Clustered index: index and data together

Nonclustered index: getting from one file to another, the index and data are not together

Question:

InnoDB structured Storage engine: primary key is required. Why?

If the InnoDB table does not have a primary key, mysql looks for a primary key that can be uniquely identified from the table

If it cannot be found, he generates the default column (hidden column). To maintain the data.

UUID: long string, occupying storage space, slow, etc.

Why use self-incrementing primary keys?

The back is larger than the front, once appended, satisfying the leaf node.

The underlying structure of the federated index:

Put the small one on the left and compare the following parameters with the same one.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Tags: Storage index data file structure engine location pointer disk help middle table type clear same content parameter leaf field character string Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS vpn Shulou Technology OPPO Reno MySQL