Issue in truncating table partion and inserting into other partion at same time
We have OLTP database where we insert around 8-10 million of data per day.Let say table name is table1.We keep around 14 days of data in production.We have DB trigger(before insert) for Table 1 which constantly inserting data into another queue table(this is for statistic calculation) .problem is when we truncate data(table 1) for partion 14 days old and that time we see few dupilcate entry in queue table. And this duplicate entry happen only when trucation is job running.For this our statistic get wrong because our statistic calculate based on queue table.This problem start occuring from a certain days(before