Lightweight Piwik mode: Setting to purge aggregated reports older than N days from the database
|Reported by:||matt||Owned by:|
|Priority:||critical||Milestone:||1.12.x - Piwik 1.12.x|
Description (last modified by matt)
The main reason that people stop using Piwik on small websites is because the DB grows out of control. Often users have 25Mb or 50m for the whole Mysql database. After installing the CMS, it is common for Piwik to have only 20M of space. We should try to make it easy to run Piwik with basic history and keep DB space below 20M.
Proposal "Lightweight Piwik" feature
- Display the current DB size. Reuse API code from: #3004
- Have a new setting "General settings" to select number of months to keep data for
- By default, keep all historical data
- In the dropdown selecting the number of months, put estimate of DB size that will be freed
- When setting enabled,
- Delete old archive_blob tables that are older than N months
- delete from all archive_numeric all rows except a critical metrics (visits, pageviews, ecommerce/goal metrics).
- also delete all segment data, numeric and blob
- Propose a dropdown to select number of months
- For each month choice "delete older than [3,6,9,12,18,2 years,4 years,custom]". Once entry is selected, refresh the space free "delete older than [18 months] (N Gb will be deleted, Total Piwik DB size will become MGb)"
- When the feature is enabled, execute it as a scheduled task (safer for huge DBs). But on page reload, we could also display a link to let the user execute the purge code NOW (when in a hurry to get the DB size under control).
V2 of this feature (to be put as "feature request" ticket)
- User could choose exactly which reports to purge.
- Have a "less agressive" purge mode that would keep more data, but still delete a lot of useless old reports nobody would care about
- The list would be pre-selected with our estimate of the most useful reports (eg. Keywords, Page URLs/Page Titles, Websites, Campaigns, All goal reports...) and delete all others. Call our selection "Recommended historical reports to keep"
- The list would handle numeric and blob.
- "Delete data for segmented reports" or "Keep reports for segmented data"
Change History (45)
comment:3 Changed 4 years ago by matt (mattab)
- Description modified (diff)
- Sensitive unset
- Summary changed from Plugin to purge the database for old statistics to Plugin to purge old statistics from the database
comment:7 Changed 2 years ago by matt (mattab)
- Description modified (diff)
- Milestone changed from Feature requests to 1.7.x - Piwik 1.7.2
- Summary changed from Plugin to purge old statistics from the database to Light Piwik mode: Setting to purge aggregated reports older than N days from the database
comment:9 Changed 2 years ago by matt (mattab)
- Summary changed from Light Piwik mode: Setting to purge aggregated reports older than N days from the database to Lightweight Piwik mode: Setting to purge aggregated reports older than N days from the database
comment:21 Changed 2 years ago by capedfuzz (diosmosis)
- Resolution set to fixed
- Status changed from new to closed