InnoDB logical storage structure

Reference: https://time.geekbang.org/column/article/121710 

 

InnoDB logical storage structure

InnoDB table structure is divided into logical storage space (Tablespace), segment (Segment), area (Extent), p Page) and a row (Row)

Table 1. Space (the Tablespace)

InnoDB table provides two way data storage space, one is shared space table A table is an exclusive space. InnoDB just silently in a shared space table, i.e., table data storing ibdata1 all.

We can open exclusive table space mode 1 (1 represents exclusively) by setting the parameter innodb_file_per_table. After the turn, each table has its own separate table space physical file, all the data and indexes are stored in the file, so easy to back up and restore data.

 

2. Paragraph (Segment)

Table space is composed of individual segments, the data segments are generally divided into segments, index segment, and the like rollback. InnoDB default data storage is based on the B + tree implementation.

Here refers to the index segment B + non-leaf nodes of the tree, and the data segment is the B + tree leaf node. The rollback the data refers to roll back the transaction isolation MVCC use the rollback segments to achieve a multi-version query data.

 

3. area (Extent) / page (Page)

Region structural unit is a table space, the size of each area is 1MB. The page is the smallest district units, p is the smallest unit of disk management InnoDB storage engine, the size of each page defaults to 16KB. In order to ensure the continuity of pages, InnoDB storage engine from disk each time the application of 4-5 zone.

 

4. row (Row)

InnoDB storage engine is for a column (row-oriented), that is to say the data is stored in rows, the rows of each page is stored with a rigid definition, allows the storage of up to 16KB / 2-200 line, i.e., line 7992 recording.

 

Guess you like

Origin www.cnblogs.com/agilestyle/p/11428574.html