cancel
Showing results for 
Search instead for 
Did you mean: 

database cleaning - customer_visitor

SOLVED

database cleaning - customer_visitor

Hello,

 

I have the following table in my magento database sitting at 350mb called:

 

customer_visitor 

 

What is the SQL command to delete all the visits before September 2019? I don't want to truncate the whole table.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: database cleaning - customer_visitor

Hi @callam_kidsaw,

You can delete from table using following query.
 

To get the result to verify.

SELECT * FROM FROM customer_visitor WHERE last_visit_at < '2019-09-01';

then you can delete if data is correct.

DELETE FROM customer_visitor WHERE last_visit_at < '2019-09-01';

I hope it will help you!

View solution in original post

1 REPLY 1

Re: database cleaning - customer_visitor

Hi @callam_kidsaw,

You can delete from table using following query.
 

To get the result to verify.

SELECT * FROM FROM customer_visitor WHERE last_visit_at < '2019-09-01';

then you can delete if data is correct.

DELETE FROM customer_visitor WHERE last_visit_at < '2019-09-01';

I hope it will help you!