DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info.gz) Compressed format

Info Catalog (mysql.info.gz) Dynamic format (mysql.info.gz) MyISAM table formats
 
 14.1.3.3 Compressed Table Characteristics
 .........................................
 
 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 `ISAM' storage engine, compressed tables
 can be created with `pack_isam' and uncompressed with `isamchk'.)
 
 Compressed tables have the following characteristics:
 
    * Compressed tables take very little disk space. This minimizes disk
      usage, which is very nice when using slow disks (such as CD-ROMs).
 
    * Each record is compressed separately, so there is very little
      access overhead.  The header for a record is fixed (1-3 bytes)
      depending on the biggest record 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 example, a
           `BIGINT' column (eight bytes) can be stored as a `TINYINT'
           column (one byte) if all its values are in the range from
           `-128' to `127'.
 
         - If a column has only a small set of possible values, the
           column type is converted to `ENUM'.
 
         - A column may use a combination of the preceding compressions.
 
 
    * Can handle fixed-length or dynamic-length records.
 
 
Info Catalog (mysql.info.gz) Dynamic format (mysql.info.gz) MyISAM table formats
automatically generated byinfo2html