• I can't see anything there that would obviously run differently under different settings. What I advise you to do is to capture each event with a trace, and capture the execution plans as well. You can then compare the slow one to the faster one. Are you confident that they are doing exactly the same thing and it's just the speed that's different?

    One thing I did notice - I think your DELETEs would run quicker if you use the TOP clause instead of searching for ranges in your data.

    John