Ask HN: InnoDb vs MyISAM?
I'm a newcomer here so I apologize if this topic has been beaten to death and then some; any useful links would be appreciated. I've been using MyISAM for a while but now have seen the light of InnoDB. I've read a little that it's slow and doesn't play well with third party technology just because it's newer. I'm just wondering if there are any drawbacks to InnoDB encountered firsthand in the trenches (for your basic, run-of-the-mill applications) before I decide to switch to this engine.
The prospect of transactions make me drool feverishly for InnoDB. I hope I'm not alone.
Thanks.
5 comments
[ 3.1 ms ] story [ 23.1 ms ] threadIn a nutshell, it depends on what you are using the database for, you may even consider something outside of a relational database if you don't need SQL and relational structure to your data. The biggest difference is the lack of granular transactions (MyISAM). This will kill your application if you have concurrent writes to a MyISAM table.
We have clients who mix MyISAM and innodb, in their case, they need to store lots of data but want it as small as possible, but still able to be accessed via SQL queries. So it is MyISAM for all tables which are read only and Innodb for the current data which needs concurrency for updates.
If you want full-text search, you're usually better off with something like Solr/Lucene or Google Custom Search Engines than MyISAM's built-in full text indexing.
The problem with MyISAM is that if you ever get significant write-load, the table-level locking will kill you. InnoDB uses row-level locking, which scales much better under heavy writes. Writes are far more likely to be a bottleneck than reads, so the faster read speed of MyISAM is rarely a boon in practice.