Speed up Magento, product import, export and general via the database

If your Magento product imports and exports certainly aren't as speedy as they used to be, it could be that the database table is just filling up with old records. There are a few to look at.

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;

For your logs - I would suggest you correctly set up log cleaning, this relies on the Magento Cron being correctly set up.

  1. Log into your Magento admin and go to System > Configuration
  2. Scroll down to Advanced > System
  3. Select Log Cleaning
  4. Change "save log, days" to a sensible figure, we use 30.
  5. Enable log cleaning
  • Pingback: Speed up Magento, product import, export and general via the … | Magento News()

  • If I truncate these 2 tables, I won't lose anything in the front end? Is this just stored, and has no use after an import or export has been done?

    • There is 6 tables you can truncate. Regarding the dataflow tables, they are only used during import/export - after the process has completed, the data is technically irrelevant.

  • when TRUNCATE index_event;
    error raise:

    Cannot truncate a table referenced in a foreign key constraint (`dev_demo1001`.`index_process_event`, CONSTRAINT `FK_INDEX_EVNT_PROCESS` FOREIGN KEY (`event_id`) REFERENCES `dev_demo1001`.`index_event` (`event_id`))

  • Benjamin

    There is a very useful way to optimize Magento site speed is deferring JavaScript loading till the last moment after all HTML and CSS. It means that JavaScript files are put to the end of page, therefore the web browser will load HTM and CSS before loading these JavaScript files. This leads to loading time be reduced and magento site perform faster than before.
    To make this JavaScript parsing easier, we had better not do it manually, let's use an extension instead because of convenience and simplicity.
    For example: https://goo.gl/Y5FxOO