Manually purge logs: Piwik 1.6

Hi,

we are currently in the process of moving data from GoogleAnalytics to our Piwik 1.6 instance. When doing that we are encountering some problems with a large UPDATE-Statement on the table “piwik_log_visit” as this table is rather large (so far the statement is running for 4500 seconds for updating data worth 1 month og GA data)

If I understand correctly the “right” approach would be to configure piwik so that old logs are “purged” (==deleted) so that the piwik_log_*-tables are much smaller.

The problem is: As we like to merge the tracked data of GA and Piwik for one site, we cannot generally delete all logs.

Is there a way to purge the logs of selected sites?

I found a description of purging manually for Piwik < 1.6:
http://mikebeach.org/2011/03/27/how-to-automatically-purge-piwik-logs-using-a-cron-job/

Can we still use that SQL (with corresponing where statements) ? Or is there another way to purge the logs of selected websites?

Thanks for any hints!
Tino

Yes this SQL is still valid probably!

Hi,

I think this topic is the right place if not, please move it.

Can you tell my why when deleting profiles(websites) data in piwik_log_link_visit_action (maybe in other tables too) are not removed? (Probably in other places).

Or why archive script is not purging them?

Archives are not meant to be automatically purged, that’s the purpose of archives :slight_smile:
It needs to be manually deleted (never needed to do so, but deleting the DB-tables and deleting temp-files should be sufficient I think).

So long,
A.Kalkhoff

So the piwik_log_link_visit_action is archive table? I thought not.