House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  SQL

to cluster or to set free

  << Previous Post |  RSS |  Tree View |  Sort Latest First |  Subscribe to this Group Next >> 

to cluster or to set free

By default, the primary key index of any table created in MS SQL is Michael Dinowitz 11/14/2011 06:38 PM
One important question to ask yourself: Is this table related to other Carl Von Stetten 11/15/2011 04:56 PM

11/14/2011 06:38 PM
Author: Michael Dinowitz Short Link: http://www.houseoffusion.com/groups/sql/thread.cfm/threadid:920#3421 By default, the primary key index of any table created in MS SQL is set to unique and clustered. I see no reason for the PK to be clustered and usually rebuild the index, removing the cluster from it. Sometimes I assign it to a field that actually does cluster. Other times I just leave it alone. Is there some secret to the use of unique clustered indexes that I'm missing? Thanks Michael
11/15/2011 04:56 PM
Author: Carl Von Stetten Short Link: http://www.houseoffusion.com/groups/sql/thread.cfm/threadid:920#3422 One important question to ask yourself: Is this table related to other tables? If so, is the primary key used to join with other tables?  If so, you probably want to leave the primary key index clustered.  The clustered index actually stores all of the table content, so a join using a clustered primary key index will be faster than joining to a non-clustered primary key index (because this will require additional SQL operations to retrieve the rest of the table's content). HTH, Carl On 11/14/2011 3:38 PM, Michael Dinowitz wrote: ----- Excess quoted text cut - see Original Post for more -----
<< Previous Thread Today's Threads Next Thread >>

Search sql

May 24, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference