Truncating Magento Log Tables

      No Comments on Truncating Magento Log Tables

Log cleaning in Magento is great, and they even provide a shell script for cleaning log tables. But sometimes I just want to do it the fast way through the MySQL cli. To do that I run this script.

TRUNCATE TABLE dataflow_batch_export;
TRUNCATE TABLE dataflow_batch_import;
TRUNCATE TABLE log_customer;
TRUNCATE TABLE log_quote;
TRUNCATE TABLE log_summary;
TRUNCATE TABLE log_summary_type;
TRUNCATE TABLE log_url;
TRUNCATE TABLE log_url_info;
TRUNCATE TABLE log_visitor;
TRUNCATE TABLE log_visitor_info;
TRUNCATE TABLE log_visitor_online;
TRUNCATE TABLE report_viewed_product_index;
TRUNCATE TABLE report_compared_product_index;
TRUNCATE TABLE report_event;

Leave a Reply

Your email address will not be published. Required fields are marked *