• Eugene Elutin (11/21/2012)


    Mark-101232 (11/21/2012)


    ...

    Another tweak helps a bit (maybe... assuming I've got this right)

    Change

    ,1, '.' + LEFT(a.email, CHARINDEX('.', a.email)-1) + '@')

    to

    ,0, '.' + LEFT(a.email, CHARINDEX('.', a.email)-1))

    Nope, it doesn't do much for performance on 1000,000 rows. May be if you have 100,000,000 of emails, then one less string concatenation would be visible...

    It actually does help but, like you said, you won't see much here because of the low usage. The biggest problem there was with the old DelimitedSplit8K function (for example) was the fact that it did do such concatenations. When you started talking about hundreds of elements to be split out per row, it got real expensive right around the 4k character mark.

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