[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