If certain precaution are not taken on time then magento Database could go extremely large.AS most of the low performance of the website is the Data which is not of used but stored in Database……Clearing these out not only saves disk space but can lead to some dramatic speed improvements as well.As Magento has several tables to store log details. These log tables has contain the customer Visited url, compared products, import & export Data flow table.
Magento has this features to clean these logs, but unfortunately this feature is disabled by default, most of the magento users to don’t turn it on.
There are two ways to clear the log tables.
We can manually clear these log details by MYSQL Query
Enable Log cleaning from admin and set the cron job for that.
1. Manually Clean directly on Table:
i) Directly run this RAW query which will allow to delete the table
Generally log table works in some of the follwoing functionality
catalog_product_view (products recently viewed box)
catalog_product_compare_add_product (recently compared products box and compare box)
wishlist_add_product (wishlist box not wishlist itself)
2) Enable log cleaning in magento:
1. Go to System > Configuration > Advanced > System > Log Cleaning
by default Enable Log Cleaning is disbale make it enable and set the days so that when cron will run in that time it will delete all your log tables
and boom as excpected
Hope this will help you