0

I am using mySQL server and I came to know that mySQL uses both InnoDB and MYISAM engine.So I want to know for any big project which engine should I choose InnoDB or MYISAM.

NewUser
  • 12,713
  • 39
  • 142
  • 236
  • 4
    That question is practically impossible to answer other than with "it depends on what you need". If you need ACID transactions, use InnoDB, if you don't care too much about perfect integrity but want raw speed, use InnoDB. – Damon Jul 30 '11 at 19:32
  • Might I suggest that you probably don't need raw speed. If you do, you can make concessions when you need to, but InnoDB is much cleaner to work with. – Clueless Jul 30 '11 at 19:34
  • Actually MySQL have much more engines, not only MyISAM and InnoDB. And there are a lot of third-party engines as well – Maxim Krizhanovsky Aug 02 '11 at 11:12

3 Answers3

3

InnoDB may be preferable when you have many foreign key relationships to manage, as it has the ability MyISAM lacks to enforce foreign keys and cascade deletes and updates.

The other important feature of InnoDB is transactions. If you have a need to process multiple statements as transactions, use InnoDB.

Michael Berkowski
  • 267,341
  • 46
  • 444
  • 390
1

InnoDB is the more modern storage engine, and is considered more reliable (supporting things such as atomic transactions and foreign key constraints).

However, MyISAM may be more performant, and supports full text search.

If you don't need FTS, I would recommend InnoDB.

Some additional reading: http://blog.inetu.net/2009/04/mysql-innodb-or-myisam/

Jonathan Holland
  • 1,243
  • 11
  • 17
0

InnoDB should be the default for all new MySQL installations. Don't use MyISAM unless you have a very good reason to do so.

This article has a comparison of InnoDB vs. MyISAM: http://www.mysqlperformanceblog.com/2009/01/12/should-you-move-from-myisam-to-innodb/

Also see the following StackOverflow post: MyISAM versus InnoDB

Community
  • 1
  • 1
sagi
  • 5,619
  • 1
  • 30
  • 31