Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Huge DB Disk space savings! Database purge should trigger on all archive_* tables at least once a day #3003

mattab opened this Issue · 4 comments

1 participant


The purge old temporary archives is probably not run on every table once in a while. Some tables are huge, wasting a lot of valuable mysql DB space (especially for shared hosts where this is a real problem).


  • From looking at "Database Usage" I see that this table is much bigger than others that are only 65M.
 piwik_archive_blob_2011_10     4.6 M   1.4 Gb  144.9 Mb    1.6 Gb ```
 But there are others: The one for Jan 2012 seems a bit big too, maybe temporary yearly reports not purged? Same for Jan 2011, 3-4 times bigger normal table, and for Jan-Feb 2008.
* It also appears that the archive_numeric are not purged neither. These are huge it hurts. 
  Why would August 2008 numeric table for the demo has 119,800 records?

We should check WHY this data is not purged yet. This will free a lot of space and will make everyone very happy!


This was also reported in forum specifically for the Janauary table -- maybe yearly reports are not deleted correctly. Especially reports with timing out memory/incomplete?


(In [6692]) Fixes #3003

  • Added new daily scheduled task: it will go through all archive table and delete outdater or incorrect records
  • Refactored code see getTablesArchivesInstalled()
  • Added test for core scheduled tasks

This will result in much disk space currently wasted being deleted the first time the new scheduled task runs after update!


(In [6699]) Refs #3003 Enable task

@mattab mattab added this to the 1.8.3 - Piwik 1.8.3 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.