• John Hanrahan (11/19/2013)


    But any idea why @@rowcount would be so slow? The line of code doing the insert is a single row insert. I can't understand why it would be so slow.

    It may not be that statement that's slow.

    If you can change the trigger, add this line before that SELECT and then see what statement gets the high execution

    SELECT @errmsg = NULL

    It does nothing, I just want to see if the long delay is in the firing of the trigger or the exact SELECT itself.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass