Magento – Log files to delete, Shrink database, Page accelerate

Over time the database is getting bigger with Magento. Among other things, this is often at the log files, written automatically by system. These can be maintained on a variety of ways or. be maintained.

But who wants to quickly delete all the time log files, e.g. by. to shrink the database, This can quickly do a SQL command in.

Picture

For this purpose, e.g.. go into PHPMyAdmin, the concrete and then select the DB tab “SQL” click. Then enter this data into the window

 

TRUNCATE TABLE log_customer;
TRUNCATE TABLE log_quote;
TRUNCATE TABLE log_summary;
TRUNCATE TABLE log_summary_type;
TRUNCATE TABLE log_url;
TRUNCATE TABLE log_url_info;
TRUNCATE TABLE log_visitor;
TRUNCATE TABLE log_visitor_info;
TRUNCATE TABLE log_visitor_online;

 

and click OK. The log data is then deleted.

 

Used in Magento versions 1.4.1.1 and 1.5.1.0 Comments? Additions? Notes? Gladly!

Addendum dated 11.11.2013

In the version 1.7.0.2 I use this command currently:

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;

 

Published by Covos

Since 2009 I have been working intensively with Magento. I started with the creation and operation of B2C stores. This was extended through my work in the logistics sector. This resulted first specialized B2E systems. Today I work day-a day with exciting B2C, B2B- and B2E projects and reports in this blog about challenges and give insider tips.

3 comments on “Magento – Log files to delete, Shrink database, Page accelerate”

    1. I have just tried it once at our 1.8.1.0er Test Store. The index_event only had a problem with the line TRUNCATE;. However, this also did not hurt. Is this case only an error message after the SQL command: #1701 – Cannot truncate a table referenced in a foreign key constraint (`testshop`.`index_process_event`, CONSTRAINT `FK_INDEX_PROCESS_EVENT_EVENT_ID_INDEX_EVENT_EVENT_ID` FOREIGN KEY (`event_id`) REFERENCES `testshop`.`index_event` (`event_id`)

Leave a Reply

Your email address will not be published. Required fields are marked *