PIWIK specifically uses INNODB tables


#1

As major migrations are moving from MYSQL to MariaDb I kindly ask you to inform me when this will be solved due to MariaDB. Default engine is usually MyISAM.

Source: Make Innodb the new default type for all new Piwik installations (VS Myisam) · Issue #4611 · matomo-org/matomo · GitHub and thread is from 2014…


(Lukas Winkler) #2

Hi,

I am not sure what exactly your question is.

InnoDB has been the default engine of Matomo for many years now.


(Fabian Dellwing) #4

I still dont get your point? Why should anyone sane switch from InnoDB to MyISAM?


#5

You are right. There are strengths and limitations to both storage engines. InnoDB outperforms MyISAM when data within the table changes frequently. Probably better in Matomo.


(T.) #6

One problem is that the InnoDB table space grows without bounds, and cannot easily be compacted. I recently changed an old Piwik instance from InnoDB to MyISAM, and the result was a reduction in disk space usage from several gigabytes to a few hundred megabytes. If you are space constrained, then you are interested in this kind of savings. Btw, less space usually also translates to better throughput. What about other table types, like Aria? So far I can also not confirm the speed advantage of InnoDB.


(Fabian Dellwing) #7

If space or speed are the only concerns, then MyISAM would be a valid option (and might be for some people). But InnoDB has other advantages and the biggest is, that MyISAM will not get new features but InnoDB will.

For more information about the differences, take a look at this handy post: https://stackoverflow.com/a/15678615/7849268


(Billy) #8

Hello

You should activate innodb_file_per_table parameter and then you ll be able easily reduce disk space

mysql> set global innodb_file_per_table=1;

my matomo instance is now:

501G /data/mysql/matomo/

im gona reduce disk space by deleting old logs from matomo_log_link_visit_action, matomo_log_action.

Here are some tips:

https://www.thegeekstuff.com/2016/02/mysql-innodb-file-per-table

If you dont know or dont want to do that you can just activate Delete old visitor logs and reports in your matomo, and than your database should not grow.


(T.) #9

Thank you for the idea! I’ll look into InnoDB again, then.