• I know you said you don't want to change the code, but it looks like there might be problematic bits in there. However, without an execution plan, I've got nothing for you. I don't know what the optimizer is doing on any of these things. I don't know the tables, the indexes, all the stuff that Gail says. Further, all those EXEC statements, what are they all doing? There's just no way to provide you with meaningful answers with so little information.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning