Inside MySQL Table 4

4.1 Index Organized Tables

If not explicitly define the primary key when creating the table, the storage engine InnoDB select or create the primary key in the following manner:

  • First, determine whether there is a non-empty unique index table, if there is, the primary key column
  • If you do not meet the above criteria, InnoDB storage engine automatically creates a 6-byte pointer
    when the table has a plurality of non-null unique index, InnoDB storage engine selects a first non-null unique index defined as the primary key. Note that, the primary key is selected according to the order defined indexes, the order of the columns when the table is not built.
    When the single statement declares the primary key or primary keys, not shown, can be used to query _rowid automatically generated primary key of the table; _rowid only to query a single list is used as the primary key for the primary key columns plurality powerless

4.2InnoDB logical storage structure

All data is stored in a logical table space, and extent by the segment table space segment, region, page page composition.

4.2.1 Table space

Section 4.2.2

Common segment has data segment, index segment and rollback.
I.e., the data segment B + tree leaf node, the index segment is the B + non-leaf nodes of the tree.

4.2.3 District

Page region is composed of a continuous space, in any case the size of each zone are 1MB. To ensure the continuity of the page area, InnoDB storage engine disk application time from 4 to five regions. By default, the size of the page InnoDB storage engine is 16KB, i.e., a region, a total of 64 consecutive page

Guess you like

Origin www.cnblogs.com/zhouyu0-0/p/11963869.html