I have a delete on a tableA.
There is a row level trigger on the tableA, that inserts into history table tableB.
About a million rows are deleted and inserted into history table. In other environments this takes less than a minute in QA it takes 3 hours.
On checking i found that delete of tableA was fast, but insert into history tableB was slow.
Stats on history tableB are a week old.
How can i tune insert into history tableB?