16.2 The MyISAM Storage Engine

16.2.1 MyISAM Startup Options
16.2.2 Space Needed for Keys
16.2.3 MyISAM Table Storage Formats
16.2.4 MyISAM Table Problems

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

Table 16.2 MyISAM Storage Engine Features

FeatureSupport
B-tree indexesYes
Backup/point-in-time recovery (Implemented in the server, rather than in the storage engine.)Yes
Cluster database supportNo
Clustered indexesNo
Compressed dataYes (Compressed MyISAM tables are supported only when using the compressed row format. Tables using the compressed row format with MyISAM are read only.)
Data cachesNo
Encrypted dataYes (Implemented in the server via encryption functions.)
Foreign key supportNo
Full-text search indexesYes
Geospatial data type supportYes
Geospatial indexing supportYes
Hash indexesNo
Index cachesYes
Locking granularityTable
MVCCNo
Replication support (Implemented in the server, rather than in the storage engine.)Yes
Storage limits256TB
T-tree indexesNo
TransactionsNo
Update statistics for data dictionaryYes

Each MyISAM table is stored on disk in two files. The files have names that begin with the table name and have an extension to indicate the file type. The data file has an .MYD (MYData) extension. The index file has an .MYI (MYIndex) extension. The table definition is stored in the MySQL data dictionary.

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 8.0, 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.4, “myisamchk — MyISAM Table-Maintenance Utility”, and Section 4.6.6, “myisampack — Generate Compressed, Read-Only MyISAM Tables”.

In MySQL 8.0, the MyISAM storage engine provides no partitioning support. Partitioned MyISAM tables created in previous versions of MySQL cannot be used in MySQL 8.0. For more information, see Section 24.6.2, “Partitioning Limitations Relating to Storage Engines”. For help with upgrading such tables so that they can be used in MySQL 8.0, see Section 2.11.4, “Changes in MySQL 8.0”.

MyISAM tables have the following characteristics:

MyISAM also supports the following features:

Additional Resources

16.2.1 MyISAM Startup Options
16.2.2 Space Needed for Keys
16.2.3 MyISAM Table Storage Formats
16.2.4 MyISAM Table Problems