Introduction to Indexes: Part 2 – The clustered index

  • I have gotten people fired in the past who say "it depends" all the time. Either give me a straight non-convoluted answer, or keep quiet or just say I don't know.

    "Technology is a weird thing. It brings you great gifts with one hand, and it stabs you in the back with the other. ...:-D"

  • talltop-969015 (1/20/2010)


    I have gotten people fired in the past who say "it depends" all the time. Either give me a straight non-convoluted answer, or keep quiet or just say I don't know.

    I'm so glad I don't work for you.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • removed by poster to keep thread from getting locked

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • I can see banning me if I used profanity or something along these lines like calling someone "small-minded" that I did not know. But I stated a personal opinion based on my lengthy DBA experience, and I also apologized to everyone that I may have offended as well. Also, I did not purposely slam all women, I simply stated my personal experience. Forums allow that. I could understand if I did not apologize for offending anyone, but I did after I realized people did not like my personal opinion. I also praised Gail Shaw as well and she is a woman.. I never called anyone "small minded" and "two-faced" either. Who is attacking who here?

    "Technology is a weird thing. It brings you great gifts with one hand, and it stabs you in the back with the other. ...:-D"

  • removed by poster to keep thread from getting locked

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • I already apologized for that remark and that is the end of that as far as I am concerned. I do not personally remind people of things they have already apologized for. Everyone makes mistakes and I do try to forgive people. As I said before, that has been my personal experience. As far as keeping quiet, if you do not like my opinion, simply block my posts and your problem is solved, but I have as much right as you do to post unless I personally attack someone or use profanity.

    "Technology is a weird thing. It brings you great gifts with one hand, and it stabs you in the back with the other. ...:-D"

  • Gentlemen, can you drop this please. It's not appropriate for the thread's topic and I'd rather not have Steve come and lock this because it got out of hand.

    Thank you.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Consider it dropped. 🙂

    "Technology is a weird thing. It brings you great gifts with one hand, and it stabs you in the back with the other. ...:-D"

  • talltop-969015 (1/20/2010)


    I have gotten people fired in the past who say "it depends" all the time. Either give me a straight non-convoluted answer, or keep quiet or just say I don't know.

    You are lucky you never worked for me. And of course now you never will! If that's your response to a very clear staement of exactly what it depends on (involving a dependency on information that clearly is NOT available to the person making the statement) you are, in my view, being silly.

    Tom

  • GilaMonster (1/20/2010)


    Gentlemen, can you drop this please. It's not appropriate for the thread's topic and I'd rather not have Steve come and lock this because it got out of hand.

    Thank you.

    Ouch - that may be my fault (as I can't see anything else that might be that controversial) - and I've already posted another comment before I saw this. Can you delete it for me?

    Tom

    Tom

  • Tom.Thomson (1/20/2010)


    Can you delete it for me?

    I can't. Only mods have the permissions to delete posts. If you wish, just edit it and remove (or alter) what you said.

    I saw nothing problematic or controversial in your first post either. I use 'it depends' on a regular basis, because it does. I'm always happy to discuss in detail what exactly it depends on.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Tom, it wasn't your post(s). Talltop and I had a spat.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • Grate article!

    You should put all of your articles in a book if you don't have one already. I will definitely buy it. Your English is a mercy for nonnative English speaker like me. I don't know why some IT authors love to use big words in their books. 😛

    Some comments are funny and I love your replies.....moving on to the Part 3.

  • I'd like an opinion. Part 2 of the article (which I'm just now reading) says a clustered index should be narrow, unique, unchanging, and ever-increasing. I have tables (some quite large) with an important key that definitely qualifies on points 2, 3, and 4, but the key length is char(26). Not the most narrow key in the world.

    The key length and contents is specified by 3rd-party software and we can't change it. Since the characters are all digits, I've tried changing the datatype to decimal, which packs it into 13 bytes, but some database operations fail when I do that and I had to change it back. (Chasing down the exact reason and fixing it is not very viable because there are hundreds of separate instances that would need changing, and no I can't make it a common routine because of the way the code is generated from the 3rd-party system.)

    This field is heavily used for lookups and changes during the (brief) data entry phase, and is also used later during reporting.

    My question is, is this key too wide to consider for a clustered index, or not? Generally it's not a large percentage of the entire row width, but if this value gets included into every other index (each table generally has 1 to 4 others), that gives me pause.

  • As always, it depends.

    26 bytes isn't that big, it's not as if we're talking a 400 byte index key. Also, if it's a vendor app that you can't change, then that's pretty much that, you can't change it.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 76 through 90 (of 122 total)

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