• The row counts are normal, the normal run should be in under 20 minutes but sometimes it takes really long time to complete.

    The column is not needed, but it doesn't affect business logic to include it. I'm not sure if changing the cluster index will change the performance and I'm not sure what would be the best option. T071_DAT_ACCT is the date column and the rest define the PK.

    Adding that column resulted on a nested loops join for the merge instead of the merge join in the estimated execution plan. Sadly, I still can't run the process again to get the actual exec plan.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2