More RBAR and "Tuning" UPDATEs

  • Great article Jeff. Another developer had a stored procedure that was run daily to create a report. The stored procedure took 3 hours to run. The SP had multiple "death by SQL" updates in it. After rewriting the code, the sp now takes 2 minutes (max) to run.

    I was a beginner at SQL when I ran across this article, and I have used this technique in many queries.

  • Matt (2/1/2009)


    Great article Jeff. Another developer had a stored procedure that was run daily to create a report. The stored procedure took 3 hours to run. The SP had multiple "death by SQL" updates in it. After rewriting the code, the sp now takes 2 minutes (max) to run.

    I was a beginner at SQL when I ran across this article, and I have used this technique in many queries.

    That's awesome, Matt. There's no better compliment an author can have than having someone come back with such a success story. Thank you for taking the time to post it. I very happy to have been able to have helped through the article.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 76 through 76 (of 76 total)

You must be logged in to reply to this topic. Login to reply