• Gary Noter (3/16/2011)


    Well written; excellent analogies.

    I've known of indexes for quite some time (nearly 20 years; oh I'm getting old[er]!) and have implemented and used them countless times.

    I'm confident I implement indexes reasonable enough (:Whistling:), though will definitely benefit becoming more technically knowledgeable of them.

    Starting at Level 1 and moving forward, all the while with the mindset I'm 'learning' something new, will reintro and expand my skill set on the topic.

    Thx.

    I agree with Gary here. The analogies weren't that great. I've always taught the phone book example as a great clustered index example, where last name is the index. In a teaching setting, hand a co-worker a phone book and ask them to look up an entry for a person in the phone book, giving them the last name. As in your example, they find the name as you described, by doing a seek on the clustered index.

    Ask another person to look up another person, only give this person the Phone Number. They would have to do a scan of every entry in order to find the person.

    You can then discuss the need for another 'notebook' that contains all the phone numbers listed in order and the last name listed with it. Now, for the second scenario, you can use this 'notebook' to do a seek for the phone number. Once the number and lastname are found in the notebook, you can use the last name found there to do a seek in the phone book and get the full person record.

    Looking forward to the rest of the series.