This article introduces the content of the PHP surface question eight of the InnoDB and MyISAM differences, has a certain reference value, now share to everyone, have the need for friends can refer to
InnoDB:
Support transaction processing, etc.
No lock Read
Support for foreign keys
Support Row lock
Index of type Fulltext not supported
Do not save the table's exact number of rows, scan the table to calculate how many rows
Delete Table is a row of deletes
InnoDB storing data and indexes in a table space
Cross-platform can be copied directly using
InnoDB must contain the index of the Auto_increment type field
Tables are hard to compress
MyISAM:
Transactions are not supported, rollback will result in incomplete rollback, no atomicity
Foreign keys are not supported
Foreign keys are not supported
Support full-Text search
Saves the exact number of rows in the table, without where, directly returning the saved rows
DELETE table, drop table first, then rebuild table
The MyISAM table is stored in three files. The frm file holds the table definition. The data file is MyD (MYData). Index file is myi (myindex) extension
Cross-platform hard to copy directly
MyISAM can make the Auto_increment type field a federated index
Tables can be compressed
Choose:
Because MyISAM is relatively simple, it is better than innodb in efficiency. If the system reads more, write less. Low requirements for atomicity. So MyISAM the best choice. and the MyISAM recovery speed is fast. Can be restored directly with backup coverage.
If the system reads less and writes more, especially when the concurrent writes are high. InnoDB is the first choice.
Both types have their own pros and cons, choose the one that completely depends on your actual class.
InnoDB:
Support transaction processing, etc.
No lock Read
Support for foreign keys
Support Row lock
Index of type Fulltext not supported
Do not save the table's exact number of rows, scan the table to calculate how many rows
Delete Table is a row of deletes
InnoDB storing data and indexes in a table space
Cross-platform can be copied directly using
InnoDB must contain the index of the Auto_increment type field
Tables are hard to compress
MyISAM:
Transactions are not supported, rollback will result in incomplete rollback, no atomicity
Foreign keys are not supported
Foreign keys are not supported
Support full-Text search
Saves the exact number of rows in the table, without where, directly returning the saved rows
DELETE table, drop table first, then rebuild table
The MyISAM table is stored in three files. The frm file holds the table definition. The data file is MyD (MYData). Index file is myi (myindex) extension
Cross-platform hard to copy directly
MyISAM can make the Auto_increment type field a federated index
Tables can be compressed
Choose:
Because MyISAM is relatively simple, it is better than innodb in efficiency. If the system reads more, write less. Low requirements for atomicity. So MyISAM the best choice. and the MyISAM recovery speed is fast. Can be restored directly with backup coverage.
If the system reads less and writes more, especially when the concurrent writes are high. InnoDB is the first choice.
Both types have their own pros and cons, choose the one that completely depends on your actual class.