Skip to content

Instantly share code, notes, and snippets.

@mpingu
Last active August 16, 2017 09:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpingu/3b5eb0d4a753e8a1fd934515410ce8c4 to your computer and use it in GitHub Desktop.
Save mpingu/3b5eb0d4a753e8a1fd934515410ce8c4 to your computer and use it in GitHub Desktop.
Magento Sales Flat Quote clean-up Query
#Fit the Number of interval days to your customer requirements.
#for Magento 1.X CE
DELETE FROM sales_flat_quote WHERE updated_at < DATE_SUB(Now(),INTERVAL 60 DAY);
#for Magento 1.X EE
DELETE FROM sales_flat_quote WHERE updated_at < DATE_SUB(Now(),INTERVAL 60 DAY);
DELETE FROM enterprise_customer_sales_flat_quote WHERE updated_at < DATE_SUB(Now(),INTERVAL 60 DAY);
#alternative use https://github.com/fbrnc/Aoe_QuoteCleaner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment