Page 1 of 1

Deleting old orders

Posted: Thu Nov 07, 2013 5:19 pm
by Brewhaus
Due to the large size of our DB we would like to delete old orders (orders say 3 or 4+ years old). Is there a way to do this within AC, or would this need to be done directly from the DB tables? If we need to do it from the tables, do we need to just delete from the ac_Orders, ac_OrderItemDetails, and ac_OrderShipments tables? Will this cause any grief (obviously, back up the DB before attempting)?

Re: Deleting old orders

Posted: Thu Nov 07, 2013 6:40 pm
by compunerdy
Gold has a option to delete orders from within admin.

Go to the order page and show orders by date range and then click the select all box and tell it to select all and not just that page and then click delete in the dropdown.

I tried it out and for 20 orders it took around 15 seconds so if you do 1000 it might just sit there for 12 minutes.. This is on my slow server though.

Re: Deleting old orders

Posted: Thu Nov 07, 2013 7:06 pm
by Brewhaus
Go to the order page and show orders by date range and then click the select all box and tell it to select all and not just that page and then click delete in the dropdown.
Well, that's new. :oops:

Re: Deleting old orders

Posted: Thu Nov 07, 2013 7:11 pm
by compunerdy
Yes.. it is one of the things I am glad they finally added. One less code change to make every time I upgrade.

Re: Deleting old orders

Posted: Thu Nov 07, 2013 7:21 pm
by Brewhaus
And, let's face it, not many people are looking at order from 5 years ago. I expect that this will really help to shrink the DB size.