Ticket #53 (closed New feature: fixed)
Lightweight Piwik mode: Setting to purge aggregated reports older than N days from the database
| Reported by: | matt | Owned by: | |
|---|---|---|---|
| Priority: | critical | Milestone: | 1.7.x - Piwik 1.7.x |
| Component: | Core | Keywords: | |
| Cc: | Sensitive: | no |
Description (last modified by matt) (diff)
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).
Note: it would be very nice to also get rid of #2805 - just one SQL query away after all... PS: and this one too #3003
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"
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

