Can you please tell me that which tables are containing junk data??
My webstore database is increasing daily. So i want to reduce my database size.
Most likely it will be log tables if you have log enabled. But to be sure run this query it will give you the largest tables and their sizes in your db:
If you want to disable logging to the database then you need to add this to your local.xml:
Then to go System > Configuration > Advanced and set Mage_Log to Disable
Finally, flush your Magento caches under System > Cache Management
Optimize Magento database
Attention: Always backup your data before performing any operations on the database.
Magento maintains several tables for logging. These tables log things such as customer accesses and frequently-compared products. Magento has a mechanism for cleaning these logs regularly, but unfortunately, this feature is disabled by default and most customers do not enable it. There are three ways to clean out these tables: via log cleaning in the Magento Admin, via
Log cleaning via administrator interface
1.From the Magento administrator interface, go to System > Configuration.
2.In the left menu under Advanced, click System.
3.Under Log Cleaning, change Enable Log Cleaning to Yes and configure the Save Log for 15 days: pic here 4.Click Save Config.
Manual cleaning via phpMyAdmin
This is the most efficient way to clean the logs for those more comfortable working with databases. It is faster than the built-in Magento tools and it allows you to clean other tables not included in those tools. This procedure will consolidate the data inside those tables, often decreasing database size by as much as 95% and greatly reducing query times.
3.At the bottom of the page, click the drop-down box With Selected and select Empty.
4.A confirmation screen will appear. Click Yes. This will truncate all of the selected tables.