Table handlers

In order to promote flexibility and choice, MySQL allows you to select what "type" of table it will create - you have the choice of MyISAM, which is the default type, InnoDB, and BDB. Of these, MyISAM and InnoDB are popular, and both offer their own advantages.

MyISAM is the default - it is very, very fast for reading and writing data of all types, which is its main feature. Over the years it has acquired more features, but ultimately it looks like it will be replaced by another table type in the long-term, called Falcon.

InnoDB support transactions and foreign keys, as well as row-level locking - this potentially allows it to update rows faster. However, on the whole you will find that InnoDB is a great deal slower than MyISAM. Unless you specifically require something that InnoDB offers, I suggest you stick with MyISAM.

 

Want to learn PHP 7?

Hacking with PHP has been fully updated for PHP 7, and is now available as a downloadable PDF. Get over 1200 pages of hands-on PHP learning today!

If this was helpful, please take a moment to tell others about Hacking with PHP by tweeting about it!

Next chapter: Round up >>

Previous chapter: Temporary Tables

Jump to:

 

Home: Table of Contents

Copyright ©2015 Paul Hudson. Follow me: @twostraws.