• Slightly off subject, it's been reported that some forms of Regex CLR are quite slow. If it does turn out to be one of the slow ones, it won't look slow on just a couple of rows but could take quite some time if you're batch processing several thousand rows.

    To be sure, I'm not in any way shape or form saying to avoid CLRs. I'm saying the same as I would for any type of code where there was a known issue including T-SQL and to simply be aware of it.

    The question that I would have is what are you doing in RegEx that a more simple LIKE or other pattern matching in T-SQL can't do for you? The reason why I'm asking that is because if you are using Regex to replace the simple pattern matching that you can do in T-SQL, there's a very high probability that functionality will be a fair bit slower than the equivalent T-SQL 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)