Trying to rewrite RBAR Function

  • And the results are? You did not give the IO or time it took for the queries in your post, 😉

    Cheers,

    J-F

  • I had realized too late that I had forgotten to include the timings, and it required almost 4 minutes to run the whole thing over, as I had quickly run the SELECT @@VERSION and forgot I needed a new window to do that in... I managed to get my post in before yours only by virtue of blind luck. Another minute or so of delay on my part, and you would have had your post up first.

    Steve

    (aka smunson)

    :):):)

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • Not sure which one of those include the Tally table function that I wrote. Did you test that, as well?

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

  • It was the execution with _Test at the end of the function name.

    Steve

    (aka smunson)

    :):):)

    Jeff Moden (1/28/2009)


    Not sure which one of those include the Tally table function that I wrote. Did you test that, as well?

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • Thank you, Sir. Glad to see you got the test data generator working, as well. I appreciate the performance report on that, as well.

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

  • [font="Verdana"]Just curious...

    Did anyone try writing a C# function to do the same job? It would be interesting to see comparible performance figures.

    [/font]

  • Matt Miller and I did some pretty good testing on that idea in the past... can't find the posts anymore... they may have been lost in the "move". Bottom line was, this is one of the very few places where a CLR will actually be a tiny bit faster if it uses RegExReplace. My feeling is that the bit of performance gain isn't worth introducing another language in the mix... of course, that's just me because CLR's start with the same letter as "Cursor" and most of either can be easily beat by some good set based code.

    --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 7 posts - 31 through 36 (of 36 total)

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