cancel
Showing results for 
Search instead for 
Did you mean: 

IMPEX or Cronjob for deleting the data in a table

0 Kudos
700

Hi Experts,

Please advise the better approach to delete 2 billion records, Should i do it via IMPEX or Cronjob?

View Entire Topic
Tuy
Discoverer
0 Kudos

1. define a custom testingStockLevelCacheRegion

2. create a service to execute truncate table & clear cache.

void truncateTable() {

   execute truncate table;

cacheRegionProvider.getRegionByName("testingStockLevelCacheRegion").forEach(e ->
{
e.clearCache();
});

}

2. execute that service method from header of hotfolder.

 

#% import de.hybris.platform.core.Registry
#% import com.service.TruncateService
#% TruncateService truncateService = Registry.getApplicationContext().getBean("truncateService")
#% truncateService.truncateTable()