I need some suggestions. We have very large database for our production and staging instance which consuming so much space.

Can we delete some log tables or extra tables from staging so that we can make some space. Please let us know the table names which could be truncated apart from products and customers. We have clear the orders already. So is there something else which could be cleared.


  • you can also clear tables which have log_* from database. They must have huge data.
    – nishu
    Jul 3, 2019 at 5:56
  • Did you resolve your issue? Jul 3, 2019 at 7:41

1 Answer 1


You can truncate following tables with these commands:

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;

These are logs and reporting tables, you can truncate these for your staging server.

  • Thanks. Although most of the tables were already empty, we have cleared the remaining tables.
    – Stack user
    Jul 3, 2019 at 9:17
  • also truncate core_url_rewrite table, and re run url indexing, this will also save more storage Jul 3, 2019 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.