Oracle 5.0 Reference Manual page 1243

Table of Contents

Advertisement

Static-format tables have these characteristics:
and
CHAR
type is not altered. This is also true for
5.0.3.
BINARY
5.0.15. As of 5.0.15,
• Very quick.
• Easy to cache.
• Easy to reconstruct after a crash, because rows are located in fixed positions.
• Reorganization is unnecessary unless you delete a huge number of rows and want to return free disk
space to the operating system. To do this, use
• Usually require more disk space than dynamic-format tables.
14.1.3.2. Dynamic Table Characteristics
Dynamic storage format is used if a
VARBINARY, BLOB, or TEXT), or if the table was created with the
Dynamic format is a little more complex than static format because each row has a header that
indicates how long it is. A row can become fragmented (stored in noncontiguous pieces) when it is
made longer as a result of an update.
You can use
columns that you access or change frequently in a table that also contains some variable-length
columns, it might be a good idea to move the variable-length columns to other tables just to avoid
fragmentation.
Dynamic-format tables have these characteristics:
• All string columns are dynamic except those with a length less than four.
• Each row is preceded by a bitmap that indicates which columns contain the empty string (for string
columns) or zero (for numeric columns). Note that this does not include columns that contain
values. If a string column has a length of zero after trailing space removal, or a numeric column has
a value of zero, it is marked in the bitmap and not saved to disk. Nonempty strings are saved as a
length byte plus the string contents.
• Much less disk space usually is required than for fixed-length tables.
• Each row uses only as much space as is required. However, if a row becomes larger, it is split into
as many pieces as are required, resulting in row fragmentation. For example, if you update a row
with information that extends the row length, the row becomes fragmented. In this case, you may
have to run
myisamchk -ei
• More difficult than static-format tables to reconstruct after a crash, because rows may be fragmented
into many pieces and links (fragments) may be missing.
• The expected row length for dynamic-sized rows is calculated using the following expression:
3
+
(number of columns
MyISAM
Note
Fixed-length row format is only available for tables without
columns. Creating a table with these columns with an explicit
clause will not raise an error or warning; the format specification will be ignored.
columns are space-padded to the specified column width, although the column
VARCHAR
and
columns are space-padded to the column width before MySQL
VARBINARY
and
BINARY
or
OPTIMIZE TABLE
myisamchk -r
or
OPTIMIZE TABLE
to obtain table statistics.
+ 7) / 8
Table Storage Formats
and
NUMERIC
DECIMAL
columns are padded with
VARBINARY
OPTIMIZE TABLE
table contains any variable-length columns (VARCHAR,
MyISAM
to defragment a table. If you have fixed-length
from time to time to improve performance. Use
myisamchk -r
1223
or
BLOB
TEXT
ROW_FORMAT
columns created before MySQL
bytes.
0x00
or
myisamchk
-r.
ROW_FORMAT=DYNAMIC
table option.
NULL

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents