Re: Unique
- From: "Carlos Sacristan" <nomail@xxxxxxxxxx>
- Date: Mon, 10 Aug 2009 13:40:32 +0200
In addition to Erland's comment (completely agree with him), there are some interesting posts of Kimberly Tripp about it: http://www.sqlskills.com/BLOGS/KIMBERLY/post/The-Clustered-Index-Debate-Continues.aspx, and also this one: http://www.sqlskills.com/blogs/kimberly/post/Ever-increasing-clustering-key-the-Clustered-Index-Debateagain!.aspx
--
-----------------------------
"Caminar sobre el agua y desarrollar software a partir de unas
especificaciones es fácil, si ambas están congeladas."
Edward V. Berard, ingeniero informático
http://blogs.solidq.com/es/elrincondeldba
"Erland Sommarskog" <esquel@xxxxxxxxxxxxx> wrote in message news:Xns9C6387883CCE1Yazorman@xxxxxxxxxxxx
RickNZ (kiessig@xxxxxxxxxxxxxxxxx) writes:The default definition of "primary key" is a unique, clustered, non null
index. You can override that definition, but you shouldn't normally do
so.
Here I will have to disagree strongly. Which is the clustered index of a
table should be a careful decision. True, in the case the table only has
one index, the primary key, this should also be a clustered index (unless
you really think a heap is the best choice and fully understand the
implications of using heap.)
But if you have more than one index on the table, there is all reason
to consider. And this is far from always an apparent choice. If you have
some sort of transaction table, you may want to have the clustered index
per customer/account to make such searches more efficient. On the other
hand, if there is a high insertion frequency, you may want to put the
clustered index on an IDENTITY column to reduce the number of page splits.
Also, if you have a PK which is a uniqueidentifier with a default of
newid(), you should definitely make this a non-clustered index.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- References:
- Unique
- From: shapper
- Re: Unique
- From: Erland Sommarskog
- Re: Unique
- From: RickNZ
- Re: Unique
- From: Erland Sommarskog
- Unique
- Prev by Date: Re: Unique
- Next by Date: Re: I'm wondering about have two connections, one inside the other.
- Previous by thread: Re: Unique
- Next by thread: Re: Unique
- Index(es):
Relevant Pages
|