Deleting old orders

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Deleting old orders

Post by Brewhaus » Thu Nov 07, 2013 5:19 pm

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)?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Re: Deleting old orders

Post by compunerdy » Thu Nov 07, 2013 6:40 pm

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.

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Deleting old orders

Post by Brewhaus » Thu Nov 07, 2013 7:06 pm

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:
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Re: Deleting old orders

Post by compunerdy » Thu Nov 07, 2013 7:11 pm

Yes.. it is one of the things I am glad they finally added. One less code change to make every time I upgrade.

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Deleting old orders

Post by Brewhaus » Thu Nov 07, 2013 7:21 pm

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.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

Post Reply