Last active
May 3, 2022 22:16
-
-
Save mystix/5360885 to your computer and use it in GitHub Desktop.
Magento: reset dashboard data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET foreign_key_checks = 0; | |
-- Last 5 Search Terms / Top 5 Search Terms | |
TRUNCATE TABLE catalogsearch_fulltext; | |
TRUNCATE TABLE catalogsearch_query; | |
TRUNCATE TABLE catalogsearch_result; | |
-- Dashboard stats (e.g. "Most Viewed Products" etc) | |
TRUNCATE TABLE report_compared_product_index; | |
TRUNCATE TABLE report_event; | |
TRUNCATE TABLE report_viewed_product_aggregated_daily; | |
TRUNCATE TABLE report_viewed_product_aggregated_monthly; | |
TRUNCATE TABLE report_viewed_product_aggregated_yearly; | |
TRUNCATE TABLE report_viewed_product_index; | |
-- Bestsellers | |
TRUNCATE TABLE sales_bestsellers_aggregated_daily; | |
TRUNCATE TABLE sales_bestsellers_aggregated_monthly; | |
TRUNCATE TABLE sales_bestsellers_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