Hi there,
i have to truncate the logfile-tables in order to clean up the database
There are several google-hits if you search for the right tables. This is what i got:
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; TRUNCATE catalog_compare_item;
Unfortunately it is important that the data for magento-reports wont be removed. Which tables (except the report_ ... ones of course) can i truncate without clearing magento-reports?
thanks for your help in advance
Run these quaries and it will truncate the logfile tables excluding Magento Reports.
SET foreign_key_checks = 0; 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 index_event; TRUNCATE catalog_compare_item; SET foreign_key_checks = 1;
thx for your answer. So you are sure that only the report_ tables are responsible for the magento-reports?
There are no foreign-key connections to other tables, the report_ tables need for consistency?
Yes, I'm sure. Check the image below. These reports will not be deleted if you that's what you want.