Post by Sukumar » Sat Apr 17, 2021 11:08 pm

Hi
My database getting bloated by lots of unnecessary data. I wonder is it safe to delete the data from customer_ip table. it is 3.5m now. and could someone please advice how to remove the session data safely without crashing the site.
thank you in advance
suku

Newbie

Posts

Joined
Wed Jun 26, 2019 8:37 pm

Post by paulfeakins » Mon Apr 19, 2021 6:39 pm

It's a good idea, but you obviously have to be careful to only remove the right stuff!

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by DBI » Tue Apr 20, 2021 12:31 pm

Yes that's safe. Make a backup of the table (you can download it if you're trying to save space on the server) and then delete away.

You can keep recent entries with a query similar to this:

Code: Select all

delete FROM `oc_customer_ip` WHERE `date_added` < '2021-04-19'
That would delete everything from 04-18 and older. You can change the criteria to anything you want (for example just 2021 would delete everything from 2020 and older).

DBI
New member

Posts

Joined
Tue Oct 14, 2014 10:58 am
Who is online

Users browsing this forum: No registered users and 31 guests