2

I have a site with more than 15000 commerce orders. This is slowing down the site drastically. I have upgraded all the modules and applied the patches regarding the table locking and so on. They haven't been of much help.

I am ok with removing the order history from the site. I just want to keep an archive of that so that I can use them once I have enough resources to handle everything.

I am not able to get the site up. Hence I will have to do all the work from the command line. So is there any safe and suggested way to archive the orders?

1 Answer 1

0

Couldn't you just backup your database using phpmyadmin, doing a .mysql export of the whole database which would keep record of all orders in the commerce_order and commerce_customer_profile tables?

Then using phpmyadmin, just remove all rows from the commerce_order table, to wipe the slate clean.

In the future, if you wanted to add all orders back into the site, you could import the data from your backup.

2
  • Chris I need the last 100 orders to be kept. So I need to delete the tables in such a way last few orders are not screwed up and they are in sync. I mean they have proper relationship to their customer profile and other related data.
    – Gokul N K
    Mar 12, 2014 at 4:24
  • I see. I'm not 100% sure, but I believe that the table rows commerce_order and commerce_customer_profile both have a customer order number column to reference by. As long as you make sure you are not deleting the last 100 order numbers, its shouldn't be affected.
    – Collins
    Mar 12, 2014 at 9:15

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.