Core URL Rewrite
The URLs are stored in
core_url_rewrite. Depend of how your Store is configured, you can delete a lot of URLS. For example, if you have disabled the category Path in the Product URL, you can delete als url_rewrites with the path. A better soloution would be to create an observer an blocking the creation of all these urls.
You can delete old entries from
sales_flat_quote. If you have an old shop, these Table is very big. Also it will automaticlly delete the associated entries in
You can delete old entries with this Query:
DELETE FROM sales_flat_quote WHERE updated_at < DATE_SUB(Now(),INTERVAL 60 DAY)
You can also create an Cronjobs which deletes old quotes automaticly.
You can delete old newsletter subscription, which are never confirmed, too. The Problem is, that in the subscriber table
newsletter_subscriber isn't a date. But you can figure out what customer subscribed 60 Days ago and delete all IDs lower then this:
DELETE FROM newsletter_subscriber WHERE subscriber_id < 13263346
If you have a lot coupon code, you can delete old one, too. You can do it in the adminpanel. Just sort the grid by creation date.
With this, you clean up this tables:
A lot of third Party modules create sometime log tables or save a lot of data in it. You have to figure it out by yourself.
To find big tables, you can use this Query:
table_name AS `Table Name`,
round(((data_length + index_length) / 1024 / 1024), 2) `Size (MB)`
WHERE table_schema = "YOUR_DATABASE_NAME"
ORDER BY `Size (MB)` DESC
The Database isn't connected to your GA. So, you don't lose Data in GA if you delete tables.
You don't have to flush the whole Table. You have to understand what data are stored in it and you can just delete old entries