Recently I have discovered the feature to delete old visitor logs from the database via the PIWIK admintool and keeping the processed archived ones. I had a database size of about 17GB, that shrunk to 9GB. Great tool
Is it possible that the table log_action did not improve from this feature? It is still about 2.6GB with 23 million records. The problem is, that i have many URLs with a unique hash in it. These are one time URLs for my user to download something. Therefore I do not need them later, but they can still be found in log_action.
Is there a possibility to integrate log_action into the purge mechanism?
Unfortunately it’s not possible at this stage, because the table is a giant lookup table. However, you can probably delete most of it and it will not cause many problems (assuming you run How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo AND you have done a recent full run).
So, if most reports are archived, you could then delete piwik_log_action … but maybe don’t delete the most recently used 100K or something like that: ?
Thanks, I will just delete some records manually. Probably a “delete” clause with a “join” checking if the hash is still used in other tables could easily work when purging.