Compressed storage format is a read-only format that is generated with the myisampack tool.
All MySQL distributions as of version 3.23.19 include
myisampack by default. (This version is
when MySQL was placed under the GPL.) For earlier versions,
myisampack was included only with licenses
or support agreements, but the server still can read tables
that were compressed with myisampack.
Compressed tables can be uncompressed with
myisamchk. (For the
storage engine, compressed tables can be created with
pack_isam and uncompressed with
Compressed tables have the following characteristics:
Compressed tables take very little disk space. This minimizes disk usage, which is helpful when using slow disks (such as CD-ROMs).
Each row is compressed separately, so there is very little access overhead. The header for a row takes up one to three bytes depending on the biggest row in the table. Each column is compressed differently. There is usually a different Huffman tree for each column. Some of the compression types are:
Suffix space compression.
Prefix space compression.
Numbers with a value of zero are stored using one bit.
If values in an integer column have a small range, the
column is stored using the smallest possible type. For
column (eight bytes) can be stored as a
TINYINT column (one
byte) if all its values are in the range from
If a column has only a small set of possible values,
the data type is converted to
A column may use any combination of the preceding compression types.
Can be used for fixed-length or dynamic-length rows.
While a compressed table is read only, and you cannot
therefore update or add rows in the table, DDL (Data
Definition Language) operations are still valid. For
example, you may still use
DROP to drop
the table, and
to empty the table.