Massive 10GB Magento Database

This is a classic, a venerable magento database was presented to me today – it had grown over time to 10GB and was in danger of being booted right off its hosting due to its wide girth!  I’d say cron hadn’t been run for years.

Anyway its very easy to clean up the magento database, most of the data bloat is stored in a group of log tables and can be just delete right away by running the following queries on the DB:

This reduced the DB size from 10GB to about 150MB.