Home  >  Article  >  Database  >  Features of InnoDB storage engine

Features of InnoDB storage engine

王林
王林forward
2020-06-20 17:47:565125browse

Features of InnoDB storage engine

Since MySQL 5.1, the default storage engine has become the InnoDB storage engine. Compared with MyISAM, the InnoDB storage engine has undergone major changes. Its main features are:

(Recommended learning: mysql tutorial)

  • supports transaction operations and has transaction ACID isolation features. The default isolation level is repeatable-read (repetable- read), implemented through MVCC (Concurrent Version Control). Ability to solve dirty read and non-repeatable read problems.

  • InnoDB supports foreign key operations.

  • InnoDB's default lock granularity row-level lock has better concurrency performance, but deadlock may occur.

  • Like MyISAM, the InnoDB storage engine also has .frm file storage table structure definitions, but the difference is that InnoDB's table data and index data are stored together, both in On the leaf nodes of the B number, the table data and index data of MyISAM are separated.

  • InnoDB has a secure log file. This log file is used to recover data loss caused by database crash or other situations and ensure data consistency.

  • InnoDB and MyISAM support the same index types, but the specific implementation is very different due to different file structures.

  • In terms of performance of add, delete, modify and query, if a large number of add, delete, and modify operations are performed, it is recommended to use the InnoDB storage engine. It deletes rows during deletion operations and does not rebuild the table.

The above is the detailed content of Features of InnoDB storage engine. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:juejin.im. If there is any infringement, please contact admin@php.cn delete