Zen Cart Logo
Forums / General Questions / Cleaning out old data on a v1.3.7.1?

Cleaning out old data on a v1.3.7.1?

Views: 786

Results 1 to 5 of 5
23 Aug 2013, 9:49 PM
#1
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Cleaning out old data on a v1.3.7.1?

Hi Gang!

So I am looking through a SQL dump in my tables (worth 5 years!) and it looks like there's data there I could do without. Or so I think.
For instance - do I really need the data in:

  • banners_history
  • customers_basket
  • customers_basket_attributes
  • customers_info (logon time, etc.)

I'm just trying to see if I could optimize thing without breaking things.

Any suggestion more than welcomed!!

Gabstero

24 Aug 2013, 1:23 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Cleaning out old data on a v1.3.7.1?

Ya, you could truncate the banners_history and customers_basket/customers_basket_attributes tables if you wanted to lose the data in them.
Chances are the amount of data in them is minimal.

DO NOT TOUCH THE customers_info table. That table must be kept in sync with the customers and address_book tables. If you touch customers_info you'll break your customer login capability.

If you're really looking to purge data, take a backup of the admin_activity_log and email_history tables, and truncate them.

26 Aug 2013, 4:04 PM
#3
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Re: Cleaning out old data on a v1.3.7.1?

thanks a lot for the advice, Dr. Byte!

Just to make sure if I get this right. Truncate means deleting some of the data in that banners_history for instance:

(61, 0, 105, 0, '2008-02-19 08:49:57'),
(62, 0, 12, 0, '2008-02-20 09:28:01'),
(63, 0, 63, 0, '2008-02-21 00:23:07'),
etc.'
etc.'

right?

thanks!
gabstero

26 Aug 2013, 4:17 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Cleaning out old data on a v1.3.7.1?

"TRUNCATE" is a MySQL statement which means "delete all records in the table and completely reset the table as if it was brand new, including resetting any internal counters and auto-incrementers, and clean up any wasted space caused by the deletion of those records".
In phpMyAdmin the menu option is probably called "Empty".

USE AT YOUR OWN RISK.

ALWAYS KEEP GOOD RELIABLE DATABASE BACKUPS, AND TEST THEIR RELIABILITY REGULARLY.

AND ALWAYS TAKE A RELIABLE BACKUP BEFORE DELETING ANY DATA!

26 Aug 2013, 4:51 PM
#5
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Re: Cleaning out old data on a v1.3.7.1?

Thanks a bunch!

That's all I needed to know.

much obliged,