0

Magento 2 tables data is showing a total size "5,115,687" , I want to truncate some large tables please guide me can I truncate the following tables without affecting store functionality: enter image description here

  1. quote
  2. quote_address
  3. quote_address_item
  4. quote_id_mask
  5. quote_item
  6. quote_item_option
  7. quote_payment
  8. qoute_shipping_rate enter image description here

because these tables keep growing and our website is slow please guide me can I truncate these tables if yes then how? thanks

2 Answers 2

0

You can truncate these tables, if you don't need the customer quote but when the customer come to the site they don't get the quotes for that.

If you want to decrease the load, you can delete the logs.

3
  • thank u please tell me can i truncate all above tables? Commented Aug 11, 2023 at 13:21
  • Yes you can truncate these tables
    – Rana Zain
    Commented Aug 11, 2023 at 17:34
  • I have run queries like "TRUNCATE TABLE quote;" query executed successfully but data is not deleted, I have also tried from phpmyadmin but the table is not empty queries successfully run without any error, I have also set SET foreign_key_checks = 0; but not works,i don't know whats the reason Commented Aug 11, 2023 at 20:10
0

You can turncate these tables in the development process without having any effect on the functionality in your Magento site. You can simple set up a corn job to execute turncate. Or, you can use the SQL given to turncate the tables:

SET FOREIGN_KEY_CHECKS=0;

TRUNCATE customer_log;

TRUNCATE customer_visitor;

SET FOREIGN_KEY_CHECKS=1;

1
  • I have run queries like "TRUNCATE TABLE quote;" query executed successfully but data is not deleted, I have also tried from phpmyadmin but the table is not empty queries successfully run without any error, I have also set SET foreign_key_checks = 0; but not works,i don't know whats the reason Commented Aug 11, 2023 at 20:10

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.