Spec-Zone .ru
спецификации, руководства, описания, API

14.3. The MyISAM Storage Engine

14.3.1. MyISAM Startup Options
14.3.2. Space Needed for Keys
14.3.3. MyISAM Table Storage Formats
14.3.4. MyISAM Table Problems

MyISAM is based on the older (and no longer available) ISAM storage engine but has many useful extensions.

Table 14.7. MyISAM Storage EngineFeatures

Storage limits 256TB Transactions No Locking granularity Table
MVCC No Geospatial data type support Yes Geospatial indexing support Yes
B-tree indexes Yes T-tree indexes No Hash indexes No
Full-text search indexes Yes Clustered indexes No Data caches No
Index caches Yes Compressed data Yes[a] Encrypted data[b] Yes
Cluster database support No Replication support[c] Yes Foreign key support No
Backup / point-in-time recovery[d] Yes Query cache support Yes Update statistics for data dictionary Yes

[a] Compressed MyISAM tables are supported only when using the compressed row format. Tables using the compressed row format with MyISAM are read only.

[b] Implemented in the server (via encryption functions), rather than in the storage engine.

[c] Implemented in the server, rather than in the storage engine.

[d] Implemented in the server, rather than in the storage engine.


Each MyISAM table is stored on disk in three files. The files have names that begin with the table name and have an extension to indicate the file type. An .frm file stores the table format. The data file has an .MYD (MYData) extension. The index file has an .MYI (MYIndex) extension.

To specify explicitly that you want a MyISAM table, indicate that with an ENGINE table option:

CREATE TABLE t (i INT) ENGINE = MYISAM;

In MySQL 5.6, it is normally necessary to use ENGINE to specify the MyISAM storage engine because InnoDB is the default engine.

You can check or repair MyISAM tables with the mysqlcheck client or myisamchk utility. You can also compress MyISAM tables with myisampack to take up much less space. See Section 4.5.3, "mysqlcheck — A Table Maintenance Program", Section 4.6.3, "myisamchk — MyISAM Table-Maintenance Utility", and Section 4.6.5, "myisampack — Generate Compressed, Read-Only MyISAM Tables".

MyISAM tables have the following characteristics:

MyISAM also supports the following features:

Additional Resources