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