The
MyISAM
Storage Engine
1219
There is no significant speed penalty for storing data low byte first; the bytes in a table row normally
are unaligned and it takes little more processing to read an unaligned byte in order than in reverse
order. Also, the code in the server that fetches column values is not time critical compared to other
code.
• All numeric key values are stored with the high byte first to permit better index compression.
• Large files (up to 63-bit file length) are supported on file systems and operating systems that support
large files.
• There is a limit of 2
32
(~4.295E+09) rows in a
MyISAM
table. If you build MySQL with the
--
with-big-tables
[123]
option, the row limitation is increased to (2
32
)
2
(1.844E+19) rows. See
Section 2.17.3, “MySQL Source-Configuration Options”
. Binary distributions for Unix and Linux are
built with this option.
• The maximum number of indexes per
MyISAM
table is 64. This can be changed by recompiling.
Beginning with MySQL 5.0.18, you can configure the build by invoking
configure
with the
--
with-max-indexes=N
option, where
N
is the maximum number of indexes to permit per
MyISAM
table.
N
must be less than or equal to 128. Before MySQL 5.0.18, you must change the source.
The maximum number of columns per index is 16.
• The maximum key length is 1000 bytes. This can also be changed by changing the source and
recompiling. For the case of a key longer than 250 bytes, a larger key block size than the default of
1024 bytes is used.
• When rows are inserted in sorted order (as when you are using an
AUTO_INCREMENT
column), the
index tree is split so that the high node only contains one key. This improves space utilization in the
index tree.
• Internal handling of one
AUTO_INCREMENT
column per table is supported.
MyISAM
automatically
updates this column for
INSERT
and
UPDATE
operations. This makes
AUTO_INCREMENT
columns
faster (at least 10%). Values at the top of the sequence are not reused after being deleted. (When an
AUTO_INCREMENT
column is defined as the last column of a multiple-column index, reuse of values
deleted from the top of a sequence does occur.) The
AUTO_INCREMENT
value can be reset with
ALTER TABLE
or
myisamchk
.
• Dynamic-sized rows are much less fragmented when mixing deletes with updates and inserts. This is
done by automatically combining adjacent deleted blocks and by extending blocks if the next block is
deleted.
•
MyISAM
supports concurrent inserts: If a table has no free blocks in the middle of the data file,
you can
INSERT
new rows into it at the same time that other threads are reading from the table. A
free block can occur as a result of deleting rows or an update of a dynamic length row with more
data than its current contents. When all free blocks are used up (filled in), future inserts become
concurrent again. See
Section 8.7.3, “Concurrent Inserts”
.
• You can put the data file and index file in different directories on different physical devices to get
more speed with the
DATA DIRECTORY
and
INDEX DIRECTORY
table options to
CREATE TABLE
.
See
Section 13.1.10, “
CREATE TABLE
Syntax”
.
•
BLOB
and
TEXT
columns can be indexed.
•
NULL
values are permitted in indexed columns. This takes 0 to 1 bytes per key.
• Each character column can have a different character set. See
Section 10.1, “Character Set
Support”
.
• There is a flag in the
MyISAM
index file that indicates whether the table was closed correctly. If
mysqld
is started with the
--myisam-recover
[415]
option,
MyISAM
tables are automatically
checked when opened, and are repaired if the table wasn't closed properly.
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...