After much experience with using Myisam table type by default, a few team members and users have requested that we should use Innodb by default.
Steps: - Change all tables type to use Innodb instead of Myisam - Add type=innodb to the [database] section of config.ini.php - this will allow users to change the default type of tables to myasam if they want - Add FAQ "How do I change the Mysql table types from Innodb to Myasam?" - do not convert existing tables. (it's ok to use both myisam for old tables, and innodb for future created archive tables, or plugin tables) - mention we use innodb in the performance guide: http://piwik.org/docs/optimize-how-to/ and http://piwik.org/docs/optimize/ ( reference mysql) - Only run OPTIMIZE table statements if tables are not innodb
Why support both? Is there any reason for someone to stick with MyISAM?
Personally I think we can just turn the switch and create InnoDB tables in the future and don't need the additional configuration setting.
Not sure if there is a real reason.
Maybe we could only use Innodb, if nobody cares about myasam?
In f85b6f0dc4633cd7f1d4b048d8246464357e897a: refs #4611 use InnoDB by default, added config option to change to different storage engine, introduced new API method to create tables which will automatically use configured engine, run optimize table only for InnoDB tables
I added a config setting for now though. Maybe there is no reason to use MyISAM but a reason to use another storage engine (eg infinidb?). It is not really changeable by the user anyway as it is defined in the global config and not changeable during installation. More or less people would have to change it in the global config before installing Piwik and afterwards put it in the user config to make sure it won't be overwritten by an update and to make sure new tables will be created with specified storage engine.
Of course we can also just remove the setting later
In 280be96c7eb65ea193cb86411352c9f994b6dc98: Fix logic: only run OPTIMIZE table on Myisam tables. Refs #4611
In b104b4b4044d7566ba00b568bf70c141dd76ba03: Remove $schema = 'Myisam' from all update methods refs #4611
In 36a9626f8151236cd1249815ba5ecf833ec644ce: Streamline config. fixes #4611
In e9c5c11babd4d7e6ec9115999c1e4b09a95c8f73: refs #4611 fix fatal error because getProfiler and fetchCol methods did not exist when executed in tracker mode