|
I’m currently reading High Performance MySQL by Schwartz, Zaitsev, Tkachenko, Zawodny, Lentz, Balling Great, in-depth material on everything related to customizing your MySQL Database configuration, and a plethora of info on all of the many, many ways and tools available, for measuring, profiling, analyzing your database. If you’re strictly an “end user” type programmer of MySQL (versus being a DBA), and have only ever created the basic tables without attention to specifics, and without knowing what the defaults are, etc..
1. Tuning the MySQL Server
|
| Feature | MyISAM | InnoDB |
|---|---|---|
| Transactions | No | Yes |
| Foreign Key Constraints | No | Yes |
| Known for High Concurrency | No | Yes |
| Full-text Searching | Yes | No |
| Compression | Yes | No |
| Row-level Locking | No | Yes |
| Your Application will probably need/involve: | Most likely use Engine: |
|---|---|
| Transactions | InnoDB |
| .. to handle mostly just Selects and Inserts is | MyISAM |
| .. more of a mixture of operations, including concurrent updates (i.e. more than just selects and inserts like the above) | InnoDB (due to its row-locking) |
| .. more stability due to handling very large amounts of data | Since MyISAM leads to data becoming corrupt easier and takes longer to recover data than InnoDB, use InnoDB |
This was meant as a motivator to consider slowing up the database portion of your application development so that your storage engine choices make sense for your app’s needs. (Its possible to change a table’s storage engine later.)
There’s way more than what I summarized above, obviously. Would advise reading dev.mysql.com and/or google groups devoted to mysql.