Skip to content

Instantly share code, notes, and snippets.

@udovicic
Created September 27, 2015 10:50
Show Gist options
  • Save udovicic/730277776791d9375cc6 to your computer and use it in GitHub Desktop.
Save udovicic/730277776791d9375cc6 to your computer and use it in GitHub Desktop.
Magento extra table flush
SET foreign_key_checks = 0;
TRUNCATE `core_cache_option`;
TRUNCATE `core_cache_tag`;
TRUNCATE `core_session`;
TRUNCATE `dataflow_batch_export`;
TRUNCATE `dataflow_batch_import`;
TRUNCATE `enterprise_logging_event`;
TRUNCATE `enterprise_logging_event_changes`;
TRUNCATE `enterprise_support_backup`;
TRUNCATE `enterprise_support_backup_item`;
TRUNCATE `index_event`;
TRUNCATE `index_process_event`;
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_event`;
TRUNCATE `report_viewed_product_index`;
TRUNCATE `catalog_category_flat_cl`;
TRUNCATE `catalog_category_product_cat_cl`;
TRUNCATE `catalog_category_product_index_cl`;
TRUNCATE `catalog_product_flat_cl`;
TRUNCATE `catalog_product_index_price_cl`;
TRUNCATE `catalog_product_index_eav_cl`;
TRUNCATE `cataloginventory_stock_status_cl`;
TRUNCATE `catalogsearch_fulltext_cl`;
TRUNCATE `enterprise_url_rewrite_category_cl`;
TRUNCATE `enterprise_url_rewrite_product_cl`;
TRUNCATE `enterprise_url_rewrite_redirect_cl`;
TRUNCATE `report_viewed_product_aggregated_daily`;
TRUNCATE `report_viewed_product_aggregated_monthly`;
TRUNCATE `report_viewed_product_aggregated_yearly`;
SET foreign_key_checks = 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment