InnoDB is a general-purpose storage engine that
balances high reliability and high performance. In MySQL
5.6, InnoDB is the default MySQL
storage engine. Unless you have configured a different default
storage engine, issuing a CREATE
TABLE statement without an ENGINE=
clause creates an InnoDB table.
InnoDB includes all the features that were part
of the InnoDB Plugin for MySQL 5.1, plus new features specific to
MySQL 5.5 and higher.
The mysql and
INFORMATION_SCHEMA databases that implement
some of the MySQL internals still use MyISAM.
In particular, you cannot switch the grant tables to use
InnoDB.
Key advantages of InnoDB include:
Its DML operations follow the ACID model, with transactions featuring commit, rollback, and crash-recovery capabilities to protect user data. See Section 14.2, “InnoDB and the ACID Model” for more information.
Row-level locking and Oracle-style consistent reads increase multi-user concurrency and performance. See Section 14.5, “InnoDB Locking and Transaction Model” for more information.
InnoDB tables arrange your data on disk to
optimize queries based on
primary keys. Each
InnoDB table has a primary key index called
the clustered index
that organizes the data to minimize I/O for primary key lookups.
See Section 14.8.9, “Clustered and Secondary Indexes” for more information.
To maintain data
integrity,
InnoDB supports
FOREIGN
KEY constraints. With foreign keys, inserts,
updates, and deletes are checked to ensure they do not result in
inconsistencies across different tables. See
Section 14.8.7, “InnoDB and FOREIGN KEY Constraints” for more
information.
Table 14.1 InnoDB Storage Engine Features
| Storage limits | 64TB | Transactions | Yes | Locking granularity | Row |
| MVCC | Yes | Geospatial data type support | Yes | Geospatial indexing support | Yes[a] |
| B-tree indexes | Yes | T-tree indexes | No | Hash indexes | No[b] |
| Full-text search indexes | Yes[c] | Clustered indexes | Yes | Data caches | Yes |
| Index caches | Yes | Compressed data | Yes[d] | Encrypted data[e] | Yes |
| Cluster database support | No | Replication support[f] | Yes | Foreign key support | Yes |
| Backup / point-in-time recovery[g] | Yes | Query cache support | Yes | Update statistics for data dictionary | Yes |
[a] InnoDB support for geospatial indexing is available in MySQL 5.7.5 and higher. [b] InnoDB utilizes hash indexes internally for its Adaptive Hash Index feature. [c] InnoDB support for FULLTEXT indexes is available in MySQL 5.6.4 and higher. [d] Compressed InnoDB tables require the InnoDB Barracuda file format. [e] Implemented in the server (via encryption functions). Data-at-rest tablespace encryption is available in MySQL 5.7 and higher. [f] Implemented in the server, rather than in the storage engine. [g] Implemented in the server, rather than in the storage engine. | |||||
To compare the features of InnoDB with other
storage engines provided with MySQL, see the Storage
Engine Features table in
Chapter 15, Alternative Storage Engines.
For information about InnoDB enhancements and new
features in MySQL 5.6, refer to:
The InnoDB enhancements list in
Section 1.4, “What Is New in MySQL 5.6”.
The Release Notes.
For InnoDB-related terms and definitions, see
MySQL Glossary.
For a forum dedicated to the InnoDB storage
engine, see
MySQL
Forums::InnoDB.
InnoDB is published under the same GNU GPL
License Version 2 (of June 1991) as MySQL. For more information
on MySQL licensing, see
http://www.mysql.com/company/legal/licensing/.