static (fixed-length) table features in MySQL

Source: Internet
Author: User

The static format is the default storage format for MyISAM tables. Use this format when the table does not contain variable length columns (VARCHAR, blobs, or text). Each row is stored with a fixed byte number.

Of the three storage formats for MyISAM, the static format is the simplest and safest (at least for crashes). The static format is also the fastest on-disk format. A quick way to get the rows from a data file to be found on disk is to multiply the line length by the line number when you look for a row by the line number in the index. Similarly, when scanning a table, it is easy to read a certain number of records with each disk read operation.

When the MySQL server is writing to a fixed format MyISAM file, if the computer crashes, security is obvious. In this case, Myisamchk can easily decide where each row starts and where it ends, so it can usually take back all the records, except for a part of the record. Note that MyISAM table indexes can be rebuilt all the time based on the data rows.

General characteristics of static format tables:

· The char column is space-filled for the column width.

· Very fast.

· Easily cached.

· It is easy to rebuild after a crash because the record is in a fixed position.

· Re-organizing is unnecessary unless you delete a huge amount of records and want to free up disk space for the operating system. To do this, you can use optimize table or myisamchk-r.

· Usually requires more disk space than a dynamic format table.

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.