MySQL Table Type
I think it is safe to say that many developers already using or about to start using MySQL table type InnoDB. Some developers even changing default MySQL storage engine to InnoDB.
In many cases it make sense to convert table type if not for all tables, then at least for some tables.
In this situation will be nice if modules developers will state what table type is necessary for those modules and why.
Otherwise, its has to be investigated and tested for all modules in the project installation. May be it is fun but it is also a lot of time.
My suggestions for Drupal developers are
- include into modules .install file the indication of MySQL table type in the end of each table creation query like "CREATE TABLE `tablename` (...) ENGINE=InnoDB DEFAULT CHARSET=utf8" or "... ENGINE=MyISAM ...";
- include into 'INSTALL.TXT' file description of why these tables need to have those types.
That will give another developers enough information for making right decision on MySQL optimization of project's Drupal installations.
Otherwise, it has to be investigated for each table.
Please share your experience.
Alex Pandre
Custom Drupal modules and themes development, SVN for Drupal environment development, Code optimization
Join MySQL group and post your suggestions in related groups in the same time


Schema API
The Schema API has made CREATE TABLE statements obsolete as of Drupal 6. If such a feature were added, it would need to be an additional array property on the schema array.
That said, I'm not sure that's something the module author should be specifying. Many web hosts do not support InnoDB tables, as they take up more space. One also needs to tune the main database settings differently for caching, memory limits, etc. in order to get the most out of InnoDB. There is also a sometimes complex interaction between tables of different engines when joining that can eliminate the benefits of InnoDB or MyISAM.
This is really something best left to the system admin, not to each module developer.
I'm talking here about MySQL optimization for complex web sites
Alex Pandre
Custom Drupal modules and themes development, SVN for Drupal environment development, Code optimization
Join MySQL group and post your suggestions in related groups in
MySQL has default table types
Aside from MySQL server defaults, I would love to see an option at Drupal core/module installation time to decide table types.
OTOH, I think it is not correct to let Drupal developers decide which is the best table type for a particular table, which is what happens when this option is specified in installation schema. If so, I would let developers advice about that, so the one installing may have a hint on what to decide.