If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

MyISAM and InnoDB

Hi There,

There are many difference between MyISAM and InnoDB for example, MyISAM is a lot faster as compared to InnoDB but MyISAM does not support transitional tables where as InnoDB does. MyISAM does not have row level locking where as InnoDB does.

So my question is, which engine does websites like Yahoo, Youtube uses since they would need all of the above features?

This isn't necessarily true. MyISAM provides much faster data reads. However, InnoDB does just about everything else faster. That means that if you're fetching small amounts of data at a time (you're not fetching tens or hundreds of KB or MB with each query), InnoDB will probably be faster.

MyISAM was the engine of choice until a few years back. At this point, I think most web developers [who have taken the time either benchmark the engines or read up on the engines] lean heavily towards InnoDB. This depends somewhat on the access patterns for your application of course. Though, most web apps are best served by InnoDB. But, you'll want to read up on the caveats associated with InnoDB.

... of course, if you use MyISAM at all, you'd want to read up on its caveats as well.

So my question is, which engine does websites like Yahoo, Youtube uses since they would need all of the above features?

Any major site will likely have a mix of MyISAM and InnoDB tables. The MyISAM tables are likely updated periodically by cron jobs, while the InnoDB tables probably receive real-time updates and serve the "real-time" data needs, as well as the services wherein data partitioning is straightforward, easy, and effective.

When in doubt, I would say to use InnoDB. Just make sure every table has an int or bigint auto-incremented primary key [under normal circumstances]. At the very least, your data will have slightly higher integrity for being managed by InnoDB ...

Last edited by svidgen; 06-22-2009 at 09:08 AM.
Reason: damn, my English sucks on Mondays ...