That makes sense to me, but I have archiving set to run once a day, and looking at what the archive code does, it seems like the above SQL is completed by the archive.sh script anyway.
For example, when I look at my logs, they go back to the first of each month, and then end. And when I look at the code in archive.sh, it seems to indicate logging for the day, week, and month. And, I don’t have any other commands that would be truncating the logs at the first of each month.
Is this an error in the documentation, or am I missing something? If the archive.sh script is doing what I want it to, then I’m pleased as punch, and we should update the FAQ mentioned above. If not, then I’m really confused.
Help? Thoughts? Developers?
 DELETE piwik_log_visit, piwik_log_link_visit_action FROM piwik_log_visit INNER JOIN piwik_log_link_visit_action WHERE piwik_log_visit.idvisit = piwik_log_link_visit_action.idvisit AND visit_server_date <= CURRENT_DATE() - 30;
 SELECT visit_server_date FROM piwik_log_visit INNER JOIN piwik_log_link_visit_action WHERE piwik_log_visit.idvisit = piwik_log_link_visit_action.idvisit ORDER BY -visit_server_date;