MyISAM

MyISAM is based on the older (and no longer available) ISAM storage engine, with many useful extensions. It has no transaction support and uses table-level locking, making it best suited to read-heavy or single-writer workloads rather than the general-purpose, highly concurrent use cases InnoDB is designed for. See Storage Engines for how it compares to the others.

FeatureMyISAM
Storage limits256TB
TransactionsNo
Locking granularityTable
MVCCNo
Geospatial data type supportYes
Geospatial indexing supportYes
B-tree indexesYes
T-tree indexesNo
Hash indexesNo
Full-text search indexesYes
Clustered indexesNo
Data cachesNo
Index cachesYes
Compressed dataYes (read-only, via myisampack)
Encrypted dataYes
Cluster database supportNo
Replication supportYes
Foreign key supportNo
Backup / point-in-time recoveryYes
Query cache supportYes
Update statistics for data dictionaryYes
MyISAM tables store data across three files: a format/definition file, a data file (.MYD), and an index file (.MYI) – see Backup and Recovery for backing them up by direct file copy, and Utilities for the myisamchk and myisampack maintenance tools. Because it lacks transactions and row-level locking, MyISAM does not support GTID-based Replication.

CREATE TABLE audit_archive (
    id INT AUTO_INCREMENT PRIMARY KEY,
    event_name VARCHAR(64),
    logged_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    FULLTEXT (event_name)
) ENGINE = MyISAM;

-- Table-level locking: a write lock blocks all other readers/writers
LOCK TABLES audit_archive WRITE;
INSERT INTO audit_archive (event_name) VALUES ('server_start');
UNLOCK TABLES;

-- Maintenance specific to MyISAM
CHECK TABLE audit_archive;
REPAIR TABLE audit_archive;
OPTIMIZE TABLE audit_archive;