Which Storage Engine is best in MySql?
Possible Duplicate:
MyISAM versus InnoDB
哪个存储引擎最适合MySql? InnoDb或MyIsam?
没有"最好",这取决于您/您的应用程序需要什么。
您可以在参考手册中阅读有关差异的信息:
InnoDB:
A transaction-safe (ACID compliant) storage engine for MySQL
that has commit, rollback, and crash-recovery capabilities to protect
user data. InnoDB row-level locking (without escalation to coarser
granularity locks) and Oracle-style consistent nonlocking reads
increase multi-user concurrency and performance. InnoDB stores user
data in clustered indexes to reduce I/O for common queries based on
primary keys. To maintain data integrity, InnoDB also supports FOREIGN
KEY referential-integrity constraints. InnoDB is the default storage
engine in MySQL 5.6.MyISAM:
These tables have a small footprint. Table-level locking
limits the performance in read/write workloads, so it is often used in
read-only or read-mostly workloads in Web and data warehousing
configurations.
"最好的"取决于很多事情:
MyISAM没有关系(FOREIGN KEYS),如果你想保持表之间的完整性你需要编写一些TRIGGERS,而在InnoDB中你可以使用"DELETE ON CASCADE"这个东西。
但是迁移时InnoDB速度较慢,因为它必须检查约束。
有关更多信息,您可以快速查看:
http://www.devshed.com/c/a/MySQL/Comparison-of-MyISAM-and-InnoDB-MySQL-Databases-57392/