0

Possible Duplicate:
MyISAM versus InnoDB

Which Storage Engine is best in MySql? InnoDb or MyIsam?

Community
  • 1
  • 1
  • It depends on your program specifications. Give some details, what are you willing to do and What are the application requirements... – jsist Oct 10 '12 at 06:35
  • What's better a car or a bike? – Nin Oct 10 '12 at 06:36
  • I recommend always *starting* with InnoDB. It has those ["magical properties"](http://en.wikipedia.org/wiki/ACID) which I *expect* from a RDBMS. – user2864740 Nov 30 '13 at 01:00

2 Answers2

3

There is no "best", It depends on what you / your application needs.

You can read about the differences here in the Reference Manual:

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.

Bjoern
  • 15,934
  • 4
  • 43
  • 48
  • I find that, for a RDBMS, InnoDB is "[usually] best". It should at least be the *primary* selection without a *specific* verified use-case otherwise. – user2864740 Nov 30 '13 at 01:02
0

"The Best" depends on many things:

MyISAM does not have relations (FOREIGN KEYS), if you want to keep integrity between tables you have to code some TRIGGERS whereas in InnoDB you can use "DELETE ON CASCADE" and this stuff. But InnoDB is slower when in migrations because it has to check constraints.

For more information, you may have a quick look to:

http://www.devshed.com/c/a/MySQL/Comparison-of-MyISAM-and-InnoDB-MySQL-Databases-57392/

arutaku
  • 5,937
  • 1
  • 24
  • 38