The compressed storage format is a read-only format created by the myisampack tool.
Myisampack is included by default in all MySQL distributions. Compressed tables can be decompressed using myisamchk.
Compressed tables have the following characteristics:
· Compressed tables occupy very little disk space. This minimizes disk usage, which is useful when using slow disks (such as CD-ROMs).
· Each record is compressed individually, so there is very little access overhead. A record header occupies 1 to 3 bytes in each table, depending on the largest record in the table. Each column is compressed differently. Usually there is a different Huffman tree for each column. Some compression types are as follows:
o Suffix space compression.
- Prefix space compression.
- Zero-valued numbers are stored in one bit.
- If the values in an integer column have a small range, the column is stored using the smallest possible type. For example, a BIGINT column (8 bytes) can be stored as a TINYINT column (1 byte) if all its values are in the range -128 to 127
- If a column has only a small set of possible values, the column type is converted to ENUM.
- A column can use any combination of previous compression types.
· Can handle fixed length or dynamic length records.