Studyon Minte9.com
Magento




Clearing Log Data



	TRUNCATE dataflow_batch_export;
	TRUNCATE dataflow_batch_import;
	TRUNCATE log_customer;
	TRUNCATE log_quote;
	TRUNCATE log_summary;
	TRUNCATE log_summary_type;
	TRUNCATE log_url;
	TRUNCATE log_url_info;
	TRUNCATE log_visitor;
	TRUNCATE log_visitor_info;
	TRUNCATE log_visitor_online;
	TRUNCATE report_viewed_product_index;
	TRUNCATE report_compared_product_index;
	TRUNCATE report_event;
	TRUNCATE index_event;
	
Careful with log_visitor - the catalog_compare_item links to it and you might get exceptions if you have the compare feature enabled. Probably removing all sessions would take care of this problem.

	TRUNCATE core_sesssion;


http://stackoverflow.com/questions/3638361/clearing-magento-log-data
http://www.crucialwebhost.com/kb/article/log-cache-maintenance-script
http://www.elief.com/blog/2010/09/instantly-speed-up-magento-commerce
http://www.magentocommerce.com/wiki/groups/