If you need FULLTEXT search, you need to use MyISAM.
If you need Foregin key support (for cascading and such), or you need to support transactions, you need to use InnoDB.
In general, if you do not need any of the special features, it's better to use MyISAM as it performs better (faster and more disk-friendly) for web applications.
There are other features that are not present in other engines as well.
MyISAM
Storage Engine FeaturesStorage 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.
|
Key Advantages of InnoDB
InnoDB
is a high-reliability and high-performance storage engine for MySQL. Key advantages of InnoDB
include:- Its design follows the ACID model, with transactions featuring commit, rollback, and crash-recovery capabilities to protect user data.
- Row-level locking (without escalation to coarser granularity locks) and Oracle-style consistent reads increase multi-user concurrency and performance.
InnoDB
tables arrange your data on disk to optimize common queries based on primary keys. EachInnoDB
table has a primary key index called the clustered index that organizes the data to minimize I/O for primary key lookups.- To maintain data integrity,
InnoDB
also supportsFOREIGN KEY
referential-integrity constraints. - You can freely mix
InnoDB
tables with tables from other MySQL storage engines, even within the same statement. For example, you can use a join operation to combine data fromInnoDB
andMEMORY
tables in a single query. InnoDB
has been designed for CPU efficiency and maximum performance when processing large data volumes.
No comments:
Post a Comment