Internal Details InnoDB

Nasza ocena:

5
Wyświetleń: 546
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Internal Details InnoDB - strona 1

Fragment notatki:

Internal Details
InnoDB has two different file formats (Antelope and Barracuda) and four different row formats
(Redundant, Compact, Dynamic, and Compressed). The Antelope file format contains Redundant and
Compact row formats. A tablespace that uses the Barracuda file format uses either the Dynamic or
Compressed row format.
File and row format information is written in the tablespace flags (a 32-bit number) in the *.ibd file
in the 4 bytes starting at position 54 of the file, most significant byte first (the first byte of the file is
byte zero). On some systems, you can display these bytes in hexadecimal with the command od -
t x1 -j 54 -N 4 tablename.ibd. If all bytes are zero, the tablespace uses the Antelope file
format, which is the format used by the standard InnoDB storage engine up to version 5.1. The system
tablespace will always have zero in the tablespace flags.
The first 10 bits of the tablespace flags can be described this way:
• Bit 0: Zero for Antelope, and bits 1 to 5 will also be zero. One for Barracuda, and bits 1 to 5 may be
set.
• Bits 1 to 4: A 4 bit number representing the compressed page size. 0 = not compressed, 1 = 1k, 2 =
2k, 3 = 4k, 4 = 8k.
• Bit 5: Same value as Bit 0, zero for Antelope, one for Barracuda. If bits 0 and 5 are set and bits 1 to 4
are not, the row format is Dynamic.
• Bits 6 to 9: A 4-bit number indicating the physical page size of the tablespace. 0=16k (original
default), 3=4k, 4=8k, 5=16k. These are the only valid values for My SQL 5.6 and later.
• Bit 10: Tablespace location. 0 = default, 1 = used DATA DIRECTORY in CREATE TABLE to choose
the tablespace location.
... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz