I am not sure if I am allowed to ask this here but I have a curiosity. Is it normal that a Magento with 800 orders to have 600mb? Also there are only 20 products (12 configurable, 3 bundles)
3 Answers
There are a lot of possible reasons, why a magento database becomes huge over time.
Having a lot of products, attributes, storeviews are common reasons, which doesn't seem to be the reason for you.
Also the core_url_rewrite table can get big because of a bug in some versions, which increases the size on every url index process.
Another reasons are the log tables, which log every pageview/productview for ever, which today is pretty useless, as everybody uses google analytics.
-
1which log every pageview/productview for ever The number 1 reason for that is failing to properly set up a cron job to run cron.php regularly and then failing to make sure the log table cleaning is properly set up. It's all built in and you can limit the logged info to 5 days maximum. Nov 8, 2014 at 3:45
-
-
@Fiasco: It seems that my problem is in settings. As you can see in the attached image: [1]: i.stack.imgur.com/ULvdj.png Are there any possible issues that can appear if I enable log cleaning directly on a live server?– DenisaNov 10, 2014 at 8:11
-
2@Denisa - Looks like it was never set up and turned on. You will probably have Magento suffer an out of memory error trying to clear a huge amount of log table garbage. Use R.S answer link Magento database maintenance which leads to a Nexcess article showing several methods of clearing out the tables. Also, for easier manual clean using mysql, this Crucial Web Host Maintenance Script prevents accidentally removing instead of truncating tables. Nov 10, 2014 at 16:35
Some of the possible tables since you don't have a lot of products would be
- sales quote tables
- page view logs tables
See Magento database maintenance
But the best way to tell would be to list all the table sizes
SELECT table_name AS "Tables",
round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"
FROM information_schema.TABLES
WHERE table_schema = "$DB_NAME"
ORDER BY (data_length + index_length) DESC;
The sales_flat_quote%
tables grow indefinitely from abandoned carts (containing items going all the way back to testing phase or day 1 of store opening). If you have set up a cron job to run cron.php
every 15 minutes, the cron routine that Magento uses to clean out expired quotes only removes the quotes that have been converted to Sales Orders.
Discussed in these two Questions:
Are unconverted quote records ever removed in Magento?
How to handle huge sales_flat_quote tables - remove abandoned cart refuse