• ScottPletcher (9/2/2015)


    Lynn Pettis (9/2/2015)


    ScottPletcher (9/2/2015)


    Lynn Pettis (9/2/2015)


    ScottPletcher (9/2/2015)


    Finally, there's the cost to fix each issue.

    Once people are properly convinced that NOLOCK is a bad idea in many, many cases, they simply remove those specific bytes -- "WITH (NOLOCK)" -- from the code. That's the sum total of rework effort.

    But for a bad identity clustering key? Massive rework could be required, especially if tables have to be redesigned/restructured. Even the simplest case of just changing the clustered index to something else requires lots of work.

    You are right and I am wrong. There is absolutely NO REASON ON EARTH that you should EVER use an identity column as a clustered index. Happy now???

    No, that's the same lie about me. I never stated one should never use an identity column. Contrarily, when I suggest anything but an identity column as a clustering key, you refer me to a video to remove my ignorance of the absolute necessity of using only identities as clustering keys.

    Then why do you keep arguing with me when I say that there are times it is appropriate? The only reason I can come to is that I am wrong and you are right.

    And I have NEVER referred you to any video.

    Again, show me any time I've ever said an identity for clustering was never right, or not right in certain cases. Indeed, I posted a link above where I explicitly endorsed an identity clustering key.

    My disgust is of the promotion of the idea that identity should be the de facto "default" clustering index. This concept has been so heavily promoted it's now deeply embedded in many places. For some people, every -- and I mean every -- table starts with an identity column, and often with "primary key" included. This is a disaster for proper data design, particularly given that so many people skip the logical design phase and go straight to actual tables.

    Edit: I apologize if I mixed you up with someone else regarding the video.

    I have never said it should be the de facto "default" clustering index. I have said that at times it is the appropriate column for the clustered index. I have always erred on the side of "it depends" in making recommendations (except maybe using uniqueidentifiers as the clustered index). So why do you keep arguing with me when I say that? That is the frustrating part.