Connecting Tech Pros Worldwide Forums | Help | Site Map

Re: Clustered Indexes, what actually happens when you rebuild one, does the optimiser love them?

David Portas
Guest
 
Posts: n/a
#1: Nov 18 '08
"Erland Sommarskog" <esquel@sommarskog.sewrote in message
news:Xns9B5AD2ADD1265Yazorman@127.0.0.1...
Quote:
>
Overall, I recommend that you always slap a clustered index on your
tables,
unless you have full understanding of the ramifications.
>
Erland,

I'm sure you mean that to be with love and care, rather than just "slap on"
any clustered index for the sake of it. :) A poorly chosen clustered index
could be worse than none at all.

--
David Portas



Erland Sommarskog
Guest
 
Posts: n/a
#2: Nov 18 '08

re: Re: Clustered Indexes, what actually happens when you rebuild one, does the optimiser love them?


David Portas (REMOVE_BEFORE_REPLYING_dportas@acm.org) writes:
Quote:
"Erland Sommarskog" <esquel@sommarskog.sewrote in message
news:Xns9B5AD2ADD1265Yazorman@127.0.0.1...
Quote:
>>
>Overall, I recommend that you always slap a clustered index on your
>tables,
>unless you have full understanding of the ramifications.
>>
>
I'm sure you mean that to be with love and care, rather than just "slap
on" any clustered index for the sake of it. :) A poorly chosen clustered
index could be worse than none at all.
Dunno. A simple-minded maintenance plan is going to clean up the mess of
a poorly selected clustered index, whereas there is not much to save a heap.

But, yes, it's certainly a good idea to select your clustered index with
some care, and not just cluster on the primary key without thinking.
Particularly not if the PK is a GUID. Then again, clustering on a GUID
does not have to be bad, as long as you specify a low fill factor, and
reindex with the same low fill factor often enough.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Closed Thread


Similar Microsoft SQL Server bytes