[Piwik-trac] [Piwik] #5: Tables log_ are not purged after archiving is done

Piwik trac at piwik.org
Thu Jan 10 16:45:29 CET 2008


#5: Tables log_ are not purged after archiving is done
--------------------+-------------------------------------------------------
  Reporter:  matt   |       Owner:                
      Type:  Bug    |      Status:  new           
  Priority:  major  |   Milestone:  Stable release
 Component:  Core   |     Version:                
Resolution:         |    Keywords:                
--------------------+-------------------------------------------------------
Old description:

> The information contained in the tables _log_* should be purged once the
> archiving is successful.
>
> Because some of the information contained in the logs may be useful for
> statistics over a week or a month (eg. compute the number of unique
> visitors) we have to make sure the useful part of this data is kept in
> another table. But this is a good idea to free the _log_* table daily as
> it would keep growing and would slow down the stats logging process.
>
> Implementation could be as follow:
> * create a table _log_unique_visitors_id
> * every day, at the end of the archiving process, copy all the
> (visitor_idcookie, server_date) from the _log_visit table into this
> _log_unique_visitors_id table
> * delete all the processed logs from _log_visit
>
> When computing a monthly archive, to get the number of unique visitors
> (see #8)
> * read the number of unique visitor_idcookie for the given month in the
> _log_unique_visitors_id table
> * delete these rows from the _log_unique_visitors_id table

New description:

 The information contained in the tables _log_* should be purged once the
 archiving is successful.

 Because some of the information contained in the logs may be useful for
 statistics over a week or a month (eg. compute the number of unique
 visitors) we have to make sure the useful part of this data is kept in
 another table. But this is a good idea to free the _log_* table daily as
 it would keep growing and would slow down the stats logging process.

 Implementation could be as follow:

 * create a table _log_unique_visitors_id

 * every day, at the end of the archiving process, copy all the
 (visitor_idcookie, server_date) from the _log_visit table into this
 _log_unique_visitors_id table

 * delete all the processed logs from _log_visit

 When computing a monthly archive, to get the number of unique visitors
 (see #8)

 * read the number of unique visitor_idcookie for the given month in the
 _log_unique_visitors_id table

 * delete these rows from the _log_unique_visitors_id table

-- 
Ticket URL: <http://dev.piwik.org/trac/ticket/5#comment:3>
Piwik <http://piwik.org>
Piwik, open source web analytics software


More information about the Piwik-trac mailing list