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