I agree. Clustered indexes on int, bigint, datetime things that make
natural range lookus work best. But exactly how does using other types slow
a letter. So the clustered index for the table is set to LastNameInitial
char(1). How would this slow down other indexes or am I just choosing a
"aaron kempf" <aaron_kempf@hotmail.com> wrote in message
news:OU$xvnc0EHA.3708@TK2MSFTNGP14.phx.gbl...
> never, ever, ever, ever, ever
>
> base a clustered index on anything other than an integer or date.
>
> it slows down all of the other indexes on the table. I prefer using INTs
> for
> clustered indexes-- especallyt for hash indexing.. but there are some
> times
> that it is really helpful to use a date for a clustered index.
>
>
>
>
> "Wayne Snyder" <wayne.nospam.snyder@mariner-usa.com> wrote in message
> news:uXp9Z59yEHA.3708@TK2MSFTNGP14.phx.gbl...
>> Let me help.... Although I am an author for Learnkey, I did not do the
>> current SQL 2k Data Warehouse stuff, but I think I can tell you what the
>> author was thinking about here..
>>
>> Think about the leaf level of non-clustered indexes. Each entry contains
> the
>> key and the row locator(pointer the actual data row.) When the
> non-clustered
>> index is built on a heap ( no clustered index exists for the table) , the
>> row locator is the physical address of the data row ( I think 6 bytes -
>> it
>> is the file#-Page#-Row#onthePage).
>>
>> If you build a clustered index on this same table on the lastname column
>> (
>> which is perhaps varchar(24) with an average length of 8 characters). The
>> row locator for EACH of the non-clustered indexes is replaced by the
>> clustered index key... We just grew the leaf entry for the row locator
> from
>> 6 to 8 bytes....
>>
>> So the size of the clustered index key matters.
>>
>> I do not know if I have the same opinion as the author you mention ( I'll
>> have to think about it.) But now you know why he said it..
>>
>> --
>> Wayne Snyder, MCDBA, SQL Server MVP
>> Mariner, Charlotte, NC
>>
www.mariner-usa.com >> (Please respond only to the newsgroups.)
>>
>> I support the Professional Association of SQL Server (PASS) and it's
>> community of SQL Server professionals.
>>
www.sqlpass.org >>
>> <anonymous@discussions.microsoft.com> wrote in message
>> news:174d01c4bc4c$4f113280$a601280a@phx.gbl...
>> > Thanks for the reply. The CD was from Learnkey. It
>> > mentions that when you use clustered indexes it will make
>> > the non-clustered index huge.
>>
>>
>
>