[MySQL] InnoDB logical storage structure _ MySQL

Source: Internet
Author: User
[MySQL] InnoDB logical storage structure bitsCN.com

[MySQL] InnoDB logical storage structure

The table in the InnoDB storage engine is very similar to the index organization table in Oracle. each table must have a primary key. if the table is not displayed with a defined primary key, the primary key is automatically created based on the following principles:

1) If a non-null unique index exists, the column where the index is located is the primary key;

2) if the preceding conditions are not met, a six-byte pointer is automatically created as the primary key.

The logical storage structure of the InnoDB storage engine is almost the same as that of Oracle, ranging from large to small: tablespace, segment, partition, and page. Their relationships are shown in:

Tablespace

In the previous MySQL InnoDB file introduction article. It should be noted that innodb_file_per_table is enabled in real time, and not all data in the table is stored in its own tablespace separately. only data, indexes, and insertion buffering are stored in the tablespace separately, others such as Undo, system transaction information, and secondary write buffering are stored in the default shared tablespace.

Segment

Table spaces are composed of several segments, including data segments, index segments, and rollback segments. The table in InnoDB is an index organization table. Therefore, the data segment is also called the leaf node segment, and the index segment is also called the non-leaf node segment.

Zone

The size of each 64 consecutive page components is exactly 1 MB.

Page

The page is the minimum unit for InnoDB disk management. the fixed size is 16 kB and cannot be changed (maybe the fixed size can be changed by changing the source code ).

Line

Data in the InnoDB table is stored by row.

BitsCN.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.