Should we be using InnoDB instead of MyIsam?
Posted: Fri Apr 03, 2009 9:27 pm
There has been remarkably little discussion of InnoDB on this forum. I have used a range of systems with MySQL as the database and I like CMS Made Simple for its simplicity. But isn't it the case that InnoDB serves better the need of a multi-user CMS than the older MyISAM engine?
Pros and cons include:
* MyISAM can be faster because it is intrinsically simpler.
* InnoDB can be faster because indexing is done better.
* InnoDB properly supports foreign keys so constraints can be enforced by the DB and thus ensure that relationships between tables remain consistent. This isn't provided by MyISAM.
* InnoDB supports cascading deletes - this is easier for the developer and gives a guarantee that related tables remain consistent.
* InnoDB supports transactions that allow consistent behaviour when more than one person is making changes. This isn't provided by MyISAM.
For two other examples, the Symfony Project (http://www.symfony-project.org/) uses InnoDB exclusively, whilst Drupal (http://drupal.org/) has the same approach as CMSMS - it's up to you to decide for yourself and the default choice is the older, simpler but less robust technology. This choice is perhaps a bit like choosing between PHP4 and PHP5 - now most people would agree that PHP5 is the way forward. If people agree, maybe it would be better for CMSMS to create InnoDB tables by default - or perhaps ask the person who is installing a new system what they need.
Rick
Further reading: http://en.wikipedia.org/wiki/Innodb, http://dev.mysql.com/doc/refman/5.1/en/ ... rview.html http://www.mysqltutorial.org/understand ... yisam.aspx
PS I've attached the script I used to convert my DB.
Pros and cons include:
* MyISAM can be faster because it is intrinsically simpler.
* InnoDB can be faster because indexing is done better.
* InnoDB properly supports foreign keys so constraints can be enforced by the DB and thus ensure that relationships between tables remain consistent. This isn't provided by MyISAM.
* InnoDB supports cascading deletes - this is easier for the developer and gives a guarantee that related tables remain consistent.
* InnoDB supports transactions that allow consistent behaviour when more than one person is making changes. This isn't provided by MyISAM.
For two other examples, the Symfony Project (http://www.symfony-project.org/) uses InnoDB exclusively, whilst Drupal (http://drupal.org/) has the same approach as CMSMS - it's up to you to decide for yourself and the default choice is the older, simpler but less robust technology. This choice is perhaps a bit like choosing between PHP4 and PHP5 - now most people would agree that PHP5 is the way forward. If people agree, maybe it would be better for CMSMS to create InnoDB tables by default - or perhaps ask the person who is installing a new system what they need.
Rick
Further reading: http://en.wikipedia.org/wiki/Innodb, http://dev.mysql.com/doc/refman/5.1/en/ ... rview.html http://www.mysqltutorial.org/understand ... yisam.aspx
PS I've attached the script I used to convert my DB.