5

Possible Duplicate:
MySql: MyISAM vs. Inno DB!

I am implementing a blog in php using MySql.

Not all engines support special field types, as BLOB (binary large object) or TEXT types, which I need to use a lot.

Furthermore I will heavily need to manage comments to posts, and different possible archives of posts, using foreign key mechanism.

Which database storage engine (MyISAM, InnoDB,..) is it best to use in terms of efficiency and functionalities?

Community
  • 1
  • 1
Matteo
  • 7,924
  • 24
  • 84
  • 129
  • MySQL is as good an engine as any for most purposes. – Raj More Sep 30 '11 at 13:42
  • MyISAM is better for your blog in terms of both efficiency and functionality. InnoDB is great if you want to do, for example, real-time transactions but for your blog, you won't need any of that. – Pete Wilson Sep 30 '11 at 13:43
  • 1
    @Pete: But InnoDB gives me the chance to use foreign key mechanisms, that comes quite useful in managing comments to posts..is it possible to use foreign keys in MyISAM? – Matteo Sep 30 '11 at 13:45

1 Answers1

3

I'd recommend InnoDB over MyISAM, because of better transactional properties. Inno would be a little slower when it comes to writing, but your data is safer, and it's not that you're gonna write 5000 records a minute.

Some software (like MediaWiki and I think WordPress too) mix up the types. They use Inno for all relations and meta data, and keep a separate table for content fields, which are stored in a MyISAM table, because it allows using FULLTEXT indexes. But this is a workaround as well. Better use Inno all the time. If you need advanced searching, use a separate seach engine like Sphinx.

GolezTrol
  • 114,394
  • 18
  • 182
  • 210