• Jeff Moden (7/5/2014)


    GilaMonster (7/5/2014)


    Jeff Moden (7/4/2014)


    Do you see any disparity between the ad-hoc code data-types and the table data-types that just might cause some unnecessary implicit conversions?

    No, Char and varchar are fine together and lengths don't cause implicit conversion problems.

    I'll have to disagree with that especially on the personal experience level especially where the CHAR data-type is involved. Unfortunately, I can't demonstrate the "personal experience" portion of that because I had them fix it and moved on. I did, however, find an article a couple of months back that had code that demonstrated the problem. Now all I have to do is find the bloody thing. :pinch:

    I've bookmarked this post. When I find the article and can demonstrate the problem, I'll post back.

    Crud. I can't find the article and I can't remember the exact example. I've also tried a couple of shots at it with a test table. Sorry folks, I'll have to retract what I said until I have proof.

    And, just to be sure, no... I wasn't confusing this with ORM code passing an NVARCHAR lookup parameter to a lookup on a VARCHAR column. That's a very well known anti-index problem.

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