TDI-30116 : use index when check relationships when delete any item.