Magento MySQL clean-up
Cleanup Magento database tables, including old quotes that never made it to checkout:
https://gist.github.com/5082859
This can be setup to run daily via CRON using a simple shell script:
#!/bin/sh
/usr/bin/mysql -u root -ppassword < /client/magento-clean.sql