cancel
Showing results for 
Search instead for 
Did you mean: 

Orphan SavedValueEntry

relsayed8205
Explorer
0 Kudos
277

Hello,

I am using SAP Commerce 2011 onPrem and I am facing the following problem:

There are SavedValueEntry objects in my database without a parent SavedValues. I get this via flexible search

SELECT
  COUNT({e:pk}) AS "total",
  MIN({e:modifiedtime}) AS "oldest",
  MAX({e:modifiedtime}) AS "newest" 
FROM
  {SavedValueEntry AS e 
  LEFT JOIN
    SavedValues AS s 
    ON {e:parent} = {s:pk} } 
WHERE
  {s:pk} IS NULL 

As the number of entries is quite large, ~4k I plan a cleanup activity for those entries. But I can not understand, how such entries existed in the first place. This will determine whether my cleanup would be a one-time action or should be done on a regular basis.

Could anyone help in this?

Thanks in advance and best regards

Rasha Elsayed

Accepted Solutions (0)

Answers (1)

Answers (1)

sduvvuri
Explorer

Hello Rasha,

This could be a one time action as the SavedValueEntry is partOf SavedValue, there should be a cascading delete on entries as well once the parent is no more.

But to monitor the orphaned SavedValueEntry objects, I'd recommend a script job to log the number of those stale objects created every hour or alternate hour to check if there's any other job being run at that point of time to come to a conclusion as to why they're being left out.

Thanks & Regards,

Subhash Duvvuri