1

I want to ask, which tables can I safely truncate in Magento, (I want to truncate all tables generated by the indexation process to make a new reindex of all my data)

  • Why would you do this, are you having constraint problems? – Toon Van Dooren Oct 6 '15 at 11:12
  • i have many products that i don t find in the indexed tables, even after a reindex process – Adel Tunesier Oct 6 '15 at 11:14
  • A truncate probably won't fix your problem then. – Toon Van Dooren Oct 6 '15 at 13:26
  • what would be a solution in this case? – Adel Tunesier Oct 6 '15 at 14:24
0

Below tables you can truncate.

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 the index tables if you have flat tables for category and products you can truncate or drop those after re-index system will do new entries or create again.

Tables like

catalog_category_flat_store_1
catalog_category_flat_store_2
catalog_product_flat_1
catalog_product_flat_2
| improve this answer | |
  • and what about the table catalog_category_product_index? – Adel Tunesier Oct 6 '15 at 11:29
  • that table storing relation between category and products. I don't think you can truncate that. – Akhilesh Patel Oct 6 '15 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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