• Ah... one more thing.  If anyone suggests the use of "portable/universal CLR triggers", send them from the room because they have no clue what a horrible impact that will have on performance.  I do because I had to fix such things where I work about 4 years ago.  It was taking about 4 minutes to update just 4 columns of 10,000 rows on a 140 column table.  Everyone was blaming the server, the "pipe", the disks and everything else except for the stupid way the triggers had been built.  Everyone thought "It's a CLR so it must be fast, right"?  I created code that would generate hardcoded triggers based on the structure of the table and, without optimization, got that evolution down to under 800 milliseconds (which is still slow but good enough, in this case because the rest of their code still sucks).

    --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)