New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete old visitor logs uses idvisit instead of the date #7180
Comments
Hi @kiwipro thanks for the report. if Piwik does not deleted based on date, that's a bug that could lead to data loss, and we should investigate. |
Hi mattab any news about ? We have stopped 'Purge DB' functionality from several weeks, and this affects our storage as piwik db is growing day by day. We would like to manually delete oldest visits from db using sql queries. Pls, could you suggest us the correct query to delete visits from piwik_log_link_visit_action and piwik_log_visit piwik tables selecting records by date ?? As example, to delete all the visits of 2015 January 15th from both piwik_log_link_visit_action and piwik_log_visit table, what is the correct query to run via mysql client or mysqladmin ?? Awaiting your prompt reply, I thank you in advance for your support. |
Hi there, any news ?? any suggestion ?? Awaiting your input, is there anyone that can help me to build the right query in order to delete old visits from piwik db ?? Thanks in advance. |
Since this could lead to data loss, increasing priority refs #6785 |
Dear @kiwipro thanks again for reporting this issue. We have fixed it and it's available in Piwik 2.14.0-b3 Could you please test this beta version and confirm that the issue is fixed? |
We configure Piwik (2.9.1) to regularly delete old visitor logs, setting to '42' days the field 'Delete logs older than' from 'Delete old visitor logs and reports' section.
Piwik saves the new configuration, recognizes the visit with oldest date (2014-12-30) and counts the records to be deleted by running the following queries:
The visit with idvisit='5328886' from our 'piwik_log*' tables is:
"157204844 38 ÇLÔ/JB" 2014-12-30 23:52:59 5328886 1198925 ..."
"5328886 38 ÇLÔ/JB" 23:52:59 1 1 0 0 0 2014-12-30 23:52:59 2014-12-30 23:53:45 ..."
If we click on 'Purge DB now', Piwik runs the following:
Our piwik_log* tables contain a lot of visits with idvisit lower than '5328886', but with more recents dates, i.e. visit with idvisit '5328876' has '2015-02-05' as date:
"157164279 30 î«7]¤b³k 2015-02-05 13:56:05 5328786 ..."
"5328786 30 î«7]¤b³k 13:56:05 1 1 0 0 0 2015-02-05 13:56:05 2015-02-05 13:56:22 ..."
It seems Piwik will not delete the visits older than 42 days, but it will delete visits based on idvisit <= '5328886'.
The text was updated successfully, but these errors were encountered: