I'm working on a magento site which has a large amount of entries in the following tables:
I have read some threads on this at: http://www.magentocommerce.com/boards/viewthread/67941/
I would like to know if i can safely delete some of the entries in these tables without foobaring the site up ! many thanks
You can actually truncate the whole table - but you'll need to make sure you set the auto-increment ID back to what it was previously.
SET FOREIGN_KEY_CHECKS=0;
DELETE FROM `sales_flat_quote` WHERE updated_at < DATE_SUB(Now(),INTERVAL 60 DAY)
However, it is much better to simple truncate records older than X days. Magento is supposed to do this automatically as part of its log cleaning - but I have never seen it working as expected (from 1.4 CE to 1.10 EE)
You can find a more thorough explanation here https://www.sonassi.com/blog/magento-kb/enourmous-magento-sales_flat_quote-tables
I would check out your other log tables too, as they'll likely be growing continually too, you can take the same approach with those, https://www.sonassi.com/blog/magento-kb/speed-up-magento-product-import-export-and-general-via-the-database
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With