:: DEVELOPER ZONE
Static format is the default for MyISAM tables.
It is used when the table contains no variable-length columns
(VARCHAR, BLOB, or
TEXT). Each row is stored using a fixed number
of bytes.
Of the three MyISAM storage formats, static
format is the simplest and most secure (least subject to
corruption). It is also the fastest of the on-disk formats. The
speed comes from the easy way that rows in the data file can be
found on disk: When looking up a row based on a row number in the
index, multiply the row number by the row length. Also, when
scanning a table, it is very easy to read a constant number of
records with each disk read operation.
The security is evidenced if your computer crashes while the MySQL
server is writing to a fixed-format MyISAM file.
In this case, myisamchk can easily determine
where each row starts and ends, so it can usually reclaim all
records except the partially written one. Note that
MyISAM table indexes can always be reconstructed
based on the data rows.
General characteristics of static format tables:
CHAR columns are space-padded to the column
width. This is also true for NUMERIC, and
DECIMAL columns created before MySQL 5.0.3.
Very quick.
Easy to cache.
Easy to reconstruct after a crash, because records are located in fixed positions.
Reorganization is unnecessary unless you delete a huge number of
records and want to return free disk space to the operating
system. To do this, use OPTIMIZE TABLE or
myisamchk -r.
Usually require more disk space than for dynamic-format tables.
© 1995-2005 MySQL AB. All rights reserved.

User Comments
Warning: query failed: Unknown column 'user.firstname' in 'field list' in /data0/sites/live/web-main/lib/mysql-cxn.php on line 69
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /data0/sites/live/web-main/lib/docbook.php on line 245
Add your own comment.