Post by Rainforest » Thu Nov 12, 2020 7:30 pm

I'm wondering what is the best practice to lighten up the database, particularly the order table.
I've got about 6 years of orders and would like to lighten it up by only keeping the last 3 years and archiving the rest.

I know first and foremost download a back up copy and store it safely.
But should I just then, delete previous orders rows in phpmyadmin and that it? or is there a better method?


Thanks
Last edited by Rainforest on Sun Nov 15, 2020 7:08 pm, edited 1 time in total.

Active Member

Posts

Joined
Fri Jan 28, 2011 3:50 am

Post by IP_CAM » Thu Nov 12, 2020 7:50 pm


I am no longer active at the Forum. Please do NOT send me Personal Mails,
they will no longer be replied to.
My Github OC Site: https://github.com/IP-CAM
4'300 + FREE OC Extensions, on the World's largest Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Rainforest » Thu Nov 12, 2020 9:08 pm

Thank you!
I'll check those out

Active Member

Posts

Joined
Fri Jan 28, 2011 3:50 am

Post by Rainforest » Sun Nov 15, 2020 7:10 pm

For anyone that searches the forum,
I ended up doing the following:

1. Backup my database
2. Went into phpmyadmin
3. ran the following sql command :
DELETE from `order` where date_added < '2018-01-01'

This deleted orders older from January 1 2018.

Active Member

Posts

Joined
Fri Jan 28, 2011 3:50 am

Post by OSWorX » Sun Nov 15, 2020 8:13 pm

Exporting (backup) old entries and deleting them is not really what you have written: archive.
Such would be for me to move older entries to an extra table and to be able to call old(er) entries when I need them.

You only are deleting them, but have to reimport them again when you need some ..
Completely different!

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria
Who is online

Users browsing this forum: No registered users and 9 guests