Your questions answered
Would it be safe for me to go through and remove all duplicate entries and potentially resolve the issue?
If you mean edit the DB directly. No. Never. Ever.
What could be happening to allow duplicate entries to occur?
It can be a number of things; but it will naturally happen from time to time.
Can anyone shed any light on the issue?
Done.
The fix
The fix is very simple actually. Where you see the error
Duplicate entry for product ID XXX
Change all indexes in Admin > System > Index Management
to be Update-On-Save
Open Admin > Catalogue > Manage Products
- filter the grid by product ID above - then edit the product.
Hit save on the product edit page
This usually rectifies 99% of Duplicate entry errors for products. Try and run the mass failed index from before to confirm. You can then change your index actions back to whatever they were previously.
core_session
is being used to store sessions - this is a poor practice, rather use another distributed session store in multiserver setups to reduce load on the db (Redis, Memcached). If you truncate this table you will lose active sessions. Is it "safe"? Yes. Ill-advised, but safe.
enterprise_logging_event_changes
controls the EE event log. If you need track-back on what took place in the admin panel I would not truncate this table. Safe, yes. I wouldn't do it though.
listrak_remarketing_session
my guess here is yes - but it's a third party module and I would contact Listrak directly; I only have one client on Listrak and we never go about truncating tables. There's really no need to. Hard drive space is so cheap and I hate to futz with a working store installation.
Some thoughts
Truncating tables does not necessarily reclaim disk space. Innodb formatted tables increase the ibd files (even in file-per-table mode) and those files never shrink back down unless the db is wiped and reimported. The only thing you could possibly save is the size of a mysqldump
later on.
I especially wouldn't be truncating tables to save a measly 29.30MB - tell your client to compress some images, that'll result in larger disk savings. If you're really that strapped for storage you may consider putting this box in the cloud where you can attach commodity devices at-will.
Best Answer
As far as I can see/know this table is included in the event
log_log_clean_after
.If you look under the file
app/code/core/Mage/Reports/etc/config.xml
you will see the following snippet.This method simply cleans all the report events and then the product viewed and compared tables.
If you make sure you have the logClean cron setup then the reports should also be cleaned up with it.