Skip to content

Instantly share code, notes, and snippets.

@burntblark
Created January 26, 2017 11:29
Show Gist options
  • Save burntblark/594f50222a463214986cf4e19a003031 to your computer and use it in GitHub Desktop.
Save burntblark/594f50222a463214986cf4e19a003031 to your computer and use it in GitHub Desktop.
List of tables to safely truncate on Magento CE v 1.x
TRUNCATE dataflow_batch_export;
TRUNCATE dataflow_batch_import;
TRUNCATE log_customer;
TRUNCATE log_quote;
TRUNCATE log_summary;
TRUNCATE log_summary_type;
TRUNCATE log_url;
TRUNCATE log_url_info;
TRUNCATE log_visitor;
TRUNCATE log_visitor_info;
TRUNCATE log_visitor_online;
TRUNCATE report_viewed_product_index;
TRUNCATE report_compared_product_index;
TRUNCATE report_event;
TRUNCATE index_event;
@burntblark
Copy link
Author

This is very useful when I want to migrate a large database without loosing vital data. Recently reduced the size of the database by 60%. Apparently, this tables store ephemeral data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment