Compressed table features in MySQL database

Source: Internet
Author: User

The compressed storage format is a read-only format created by the Myisampack tool.

All MySQL distributions include myisampack by default. Compressed tables can be decompressed using MYISAMCHK.

A compressed table has the following characteristics:

· Compressed tables occupy very small disk space. This minimizes the amount of disk used, which is useful when using slow disks such as CD-ROM.

· Each record is compressed individually, so only very small access expenses are available. The header of a record occupies 1 to 3 bytes per table, depending on the largest record in the table. Each column is compressed differently. Usually each column has a different Huffman tree. Some of the compression types are as follows:

o suffix space compression.

-Prefix space compression.

-the number of 0 values is stored with a bit.

-If the value in an integer column has a small range, the column is stored with the smallest possible type. For example, a bigint column (8 bytes), if all its values are within the range of 128 to 127, it can be stored as a tinyint column (1 bytes)

-If a column has only a small set of possible values, the column type is converted to an enum.

-A column can use any merge of the previous compression type.

· You can handle fixed-length or dynamic-length records.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.