2

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)

4

There are a lot of possible reasons, why a magento database becomes huge over time.

  1. Having a lot of products, attributes, storeviews are common reasons, which doesn't seem to be the reason for you.

  2. 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.

  3. Another reasons are the log tables, which log every pageview/productview for ever, which today is pretty useless, as everybody uses google analytics.

| improve this answer | |
  • 1
    which 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. – Fiasco Labs Nov 8 '14 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? – Denisa Nov 10 '14 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. – Fiasco Labs Nov 10 '14 at 16:35
2

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;

See How to get the sizes of the tables of a mysql database?

| improve this answer | |
0

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.