Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I want to design a forum script with MySql. Which database engine would have better performance? MyISAM or InnoDB ?

share|improve this question
    
Asking questions about what engine performs better when you have provided almost no detail will likely result in your question being closed as "shopping list". Add details about your scenario, please! –  Max Vernon Aug 30 '13 at 23:31
    
Nor MyISAM or InnoDB belongs to me. I want know the experiences of experts. I think all of programmers interesting on database performances. The forum script is an explanatory for specific programmings. –  Huseyin Aug 31 '13 at 11:12
add comment

closed as off-topic by Mark Storey-Smith, Max Vernon, FreshPhilOfSO, StanleyJohns, Mat Aug 31 '13 at 5:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Shopping list question - questions about which tool, library, product or resource you should use are off-topic here because they quickly become obsolete and often are just about the preferences of the answerer. If you have an issue with or a question about a specific tool, please revise your question to conform to that scope." – Mark Storey-Smith, Max Vernon, FreshPhilOfSO, StanleyJohns
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 5 down vote accepted

Always use InnoDB by default.

  • InnoDB is durable and crash-safe. Your database will not be corrupted in a crash. MyISAM is very susceptible to data corruption. This should be a more important consideration than performance -- unless you don't really care if you lose your data.

  • InnoDB caches both data and indexes in RAM. MyISAM caches only indexes in RAM. So if you have enough RAM, queries will almost certainly be faster in InnoDB.

  • InnoDB is the default. It has been MySQL's default storage engine since MySQL 5.5 (circa 2010).

  • InnoDB continues to improve. MyISAM is not being improved. All of the storage engine engineering work is going into InnoDB.

  • InnoDB is faster anyway. Here's a performance comparison from way back in 2007 that shows InnoDB beats MyISAM in most tests: http://www.mysqlperformanceblog.com/2007/01/08/innodb-vs-myisam-vs-falcon-benchmarks-part-1/

    Of course, benchmarks results show the performance of the benchmark, not the performance of your application. If you want a more authoritative answer, you should run sysbench to test your database on your hardware.

There are cases where MyISAM is faster, but these cases are becoming more and more rare. For instance, doing table-scans. Or SELECT COUNT(*) FROM Table. But you should treat InnoDB as the default storage engine choice until you can demonstrate a case where MyISAM beats it.

share|improve this answer
    
+ Foreign Keys. –  ypercube Aug 30 '13 at 23:35
    
@ypercube, of course, but that's not as relevant to the OP's question about performance. Foreign keys can even be a disadvantage for scalability because of extra S-locks. –  Bill Karwin Aug 30 '13 at 23:50
    
Yes, it's not exactly relevant to the question. Can you pop on the Heap if you have a minute to spare? –  ypercube Aug 31 '13 at 0:01
    
+1 on the full InnoDB pitch since MyISAM can't cache a lick of data anywhere (as shown by your second point) –  RolandoMySQLDBA Aug 31 '13 at 0:02
    
Thanks @BillKarwin . Your answer is complete and explanatory. –  Huseyin Aug 31 '13 at 11:16
show 2 more comments

Not the answer you're looking for? Browse other questions tagged or ask your own question.